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.
I am still plagued by this issue. I am constantly losing objects because I switch to a tile layer with an object selected and then hit delete at some point. This often happens because a) I scroll away and don’t notice an object is selected or b) the selection “ants” are very small and I don’t notice. It’s also a big issue because the object stays selected forever, so I might have switch layers hours ago and then I hit delete and the object is gone.
Is there any update on when/if this will be addressed?
This just happened again and I now see the use case that is biting me. I select an object, change some params (or what not), I then select a tile layer (while the object is still selected), I go some tile editing and then I use the tile selection tool and do a ^x to cut the tiles (or delete) and the still selected object is deleted as well. In this case, it’s doing multi-selection (objects + tiles) with no modifier key.
My map is huge so most of the time I’ve scrolled away from the selected object.
The other thing that makes this hard is there is no key to unselect everything. The No Selection menu option is greyed out if you’re not on the object layer. It would be nice to have a key to unselects everything on all layers (is there one?)
Sorry Ron, I forgot about this. I’ll be sure to implement the deselection logic when switching layers in an update. Thanks for bringing it up again!
Also, the “Select None” (Ctrl+Shift+A) action should be updated so that the action stays enabled as long as there is either a tile or object selection.
I pushed a fix for this:
@Ron1987 Regarding the deselection when switching layers, I’m considering to alternatively ignore object selection when not at least one object layer is selected (for Cut and Delete). This would be less destructive and should still be a solution to your problem. How do you feel about this behavior?
I just wanted to say that I have this same issue with 1.2. I’m going to try to get used to Ctrl+Shift+A whenever I select tiles. But I do feel like if you are selecting tiles, unless you also have the object layer selected, the objects should be deselected.
@AxiomVerge Thanks for the additional feedback! I do have a patch in progress regarding this issue, I was just still doubting whether to actually deselect, or whether to make Delete / Cut ineffective on the object selection when no object layer is selected. Either change will be included in 1.2.1.
The reason why it’s taking so long now though is that I’m currently very busy with renovations to make sure we can move to our new home before winter. I’ll try to find a bit of time soon.
Totally understand…actually am renovating a new home myself to move into before the holidays. Super stressful stuff.
I saw that you fixed this in 1.2.1. Thanks so much!