Rangi42 / tilemap-studio

A tilemap editor for Game Boy, Color, Advance, DS, and SNES projects. Written in C++ with FLTK.
https://hax.iimarckus.org/topic/7691/
Other
381 stars 30 forks source link

Undo Functionality Bug #39

Closed JaceDeane closed 3 years ago

JaceDeane commented 3 years ago

Placing a single tile (grouped selection or singular) does not flag the undo button or key shortcuts to be able to reversed. Only after placing a second does this flag trigger, however the history of actions seems to still be recording, and once another tile is placed, the entire catalogue of placements is able to be undone.

Rangi42 commented 3 years ago

Note for later: in change_tile_cb try moving the update_active_controls call after the different click handlers when Fl::event_button() == FL_LEFT_MOUSE. Also consider factoring out the Undo/Redo update into its own method.