Lemmings Forums

NeoLemmix => Community Edition => Closed => Topic started by: Apjjm on August 25, 2021, 09:47:36 PM

Title: [✓][SUG][ED] Preserve selection on undo (when possible)
Post by: Apjjm on August 25, 2021, 09:47:36 PM
If I currently multi-select a bunch of objects and move them, but accidentally move them too far and hit undo, the pieces will move back as expected but I will lose my selection - this can be a bit painful if I have had to carefully select & unselect pieces after an initial group select. Whilst I can create a temporary group to get around this sometimes, it is a bit of a hack and not what I intuitively try to do in the editor.

It makes sense for undo to clear the selection if a piece was added/removed as part of the undo - so i'm not suggesting that this behaviour changes.
Title: Re: [?][SUG][ED] Preserve selection on undo (when possible)
Post by: WillLem on February 21, 2026, 08:46:42 PM
To fix this, the selection status of each piece needed to be taken into account when cloning the level (which undo/redo relies on). Then, we take a snapshot when adding/removing pieces to/from the selection.

Fixed in commit f32121c.