adventuregamestudio / ags

AGS editor and engine source code
Other
672 stars 159 forks source link

In the View editor, Frame selection not set to the next frame after deleting one #2428

Closed ivan-mogilko closed 2 weeks ago

ivan-mogilko commented 2 weeks ago

The original behavior in the View editor was to set selection to the next frame in the loop after currently selected frame is deleted.

This behavior is broken in 3.6.1, after multiple frame selection was implemented (#2127).

Because of the multiple selection support, which includes selecting frames across multiple loops, the code became more complicated, so the original approach no longer works as-is. Previously, it was enough to remember the last selected frame in a loop control (ViewLoopEditor) and that loop control would then select next frame. See ViewLoopEditor.DeleteSelectedFrames() method. Now the ViewEditor likely has to take part in this. See ViewEditor.DeleteSelectedFrames() method.

ivan-mogilko commented 2 weeks ago

Pushed a fix: 5dd7b7ec25f38f5c045ecbcbe9f5d3f09cdb3a1c

ivan-mogilko commented 2 weeks ago

Fixed.