If I have an object selected, then I switch to a tile layer and select some tiles and hit delete, the object is also deleted. You can see it remains selected (moving ants) when the tile layer is selected.
Please always include the version when reporting issues. This is not the behavior of Tiled 1.1.5, but it is in the development snapshots.
It changed in the following commit:
Now all actions (Cut, Copy and Delete) will operate on both the tile selection as well as the object selection. Also the Paste action (and Paste in Place) can insert both tiles and objects. The behavior is not ideal, but it still really helps if you have content in multiple layers and you want to move it (be it within the same map or between maps).
Another thing is that while there is still a “current layer”, you can now select multiple layers. So just because the current layer is not an object layer, does not mean actions like Cut and Delete should not operate on selected objects. Should it be avoided if none of the selected layers are object layers? Maybe, but I’m afraid it would be a somewhat hidden inconsistency.
Of course, your feedback is important and I wonder how we can make it more intuitive. I have considered unifying the selection tools, such that we have one tool for modifying both tile and object selection. One problem with this it that especially the object “selection” tool does much more than just selection, it also implements all the interactions like moving, rotating and resizing. In addition, there are multiple tools for modifying tile selection. So I’m afraid to make a mess when trying to unify this.
Another possibility is to separate things again. We want to keep multi-layer selection, but maybe we could do away with cut/copy/delete working on both object layers and tile layers, and require either a tile selection tool or the object selection tool to be selected for the actions to work. But I don’t really like that either since tile layers and object layers are usually tightly coupled.
Whoops, what a long text, but at least now you know where this change comes from. Any alternative suggestions are welcome!
I’m running 2018.03.21
I see why you have it this way and I can see the use case, but objects and tiles just feel different enough that I don’t know if they should be paired like that. If you switch layers (object or tile), it seems natural to kill the selection. If you shift/option select, then keeping the selection makes sense. You’re clearly saying to want this to act on multiple layers.
I’m still using 2018.03.21 and I am continually getting bit by this issue and loosing work. I tried to closely examine when/why it happens and I’ve narrowed it down to this scenario:
I have an object layer selected and I create or select an object. I then switch to a tile layer and the object is still selected. I can work on the tile layer, stamping tiles and doing quite a bit of work. The whole time the object is still selected. At some point, I select some tiles and hit delete to delete them and the object disappears too.
I understand (and agree) that the object should stay selected when switching layers, but once I start doing work on the new layer (stamping tiles or open a new tile selection) the selected object should become unselected.
Is there a new build that address this issue? At this point, my work flow is very dependent on being able to select multiple tile layers and modify them, so I can’t go back to a released build unless that has been integrated.
Actually I’m not so sure about this. In the meantime I noticed that for example Inkscape clears the selection when switching layers, though it has an option to disable this behavior. I find this behavior a little unexpected especially since Inkscape does not even have different layer types, but maybe it is what most people would expect.
Or maybe the selection should be cleared when switching between different layer types, and only be kept when using Ctrl / Shift to select additional layers, like you’ve already suggested.
Unfortunately not. There is a new snapshot, but it brings some other fixes and improvements. I’ll try to look into this before the next snapshot.
Yes, I think that makes the most sense.