Commit Graph

6 Commits

Author SHA1 Message Date
David Capello e703de535e Show saved undo state in Edit > Undo History window (fix #3578)
Some extra changes introduced:
* DocUndo & CmdTransaction were simplified: removing the saved
  counter, and storing a specific UndoState pointing to the state that
  matches the version in the disk
* DocUndo::onDeleteUndoState() can generate a
  impossibleToBackToSavedState() if the saved state is deleted. This
  might fix some bugs where a "save changes" dialog weren't displayed
  after undoing and making changes (probably related to #3542, but not
  sure)

Some extra work is needed to avoid showing the "save changes" dialog
if we are close to the saved state and only non-modification undo
states separate us from there. E.g. if we open a file, select the
canvas, and close it, Aseprite now shows the "save changes" dialog,
this wasn't true in previous versions.
2022-11-02 09:57:52 -03:00
David Capello 5c4024c44f Replicate same changes from c0dfb832d8 for redo (#3539) 2022-09-29 11:04:05 -03:00
David Capello c0dfb832d8 Fix crash if a script modifies the sprite when we're undoing/redoing (fix #3539)
To do this the script must be listening the sprite changes (which are
generated on undo/redo commands too).
2022-09-29 10:57:40 -03:00
David Capello 3ac4ca8869 Create a custom widget for UndoHistory (fix #3281)
Several performance issues fixed (as we avoid keeping a ListBox with
ListItem in sync with the UndoHistory/UndoStates). There is still some
room for improvement: e.g. grouping several ui::View::updateView() in
just one if several onAddUndoState() will be called (e.g. when we are
running a script without transactions).
2022-05-23 16:19:06 -03:00
David Capello d00fc99138 Rename DocumentRange -> DocRange 2018-07-07 10:07:21 -03:00
David Capello ac7e48d92d Rename DocumentUndo -> DocUndo 2018-07-07 02:55:27 -03:00