Allow to override a new protected method Document.CreateUndoRedoManager to change the implementation of IUndoRedoManager.
Add method IUndoRedoManager.PushAction to stack an action without executing it.
Interesting when the first action implementation (the "do") is different from the redo, or executed before the action is stacked (for example, a painting brush draw a line continuously but push an action only when the brush is not applied anymore).
Fix UndoRedoManager.UndoAll not calling OnBegin and OnEnd.
Improve the History tool:
Gray text for redo actions instead of undo actions. (more intuitive to see undone actions in gray)
Selection synchronization fixed.
Slider aligned on items.
Text trimmed + tooltips when text is too long.
Update 23/07:
Dispose IUndoableAction (if they implement IDisposable) when they are removed from undo stack. It allows to free resources kept in case the action is undone/redone.
Dispose IUndoRedoManager when the document is closed to dispose all the IUndoableAction remaining in the stack.
You seem to be merging pull requests again so I hope you will give it a look. :)
CI failed for a SDK issue not in my hand. Re-run it will probably be enough to validate it.
I made some improvements on the undo redo system:
Document.CreateUndoRedoManager
to change the implementation ofIUndoRedoManager
.IUndoRedoManager.PushAction
to stack an action without executing it.UndoRedoManager.UndoAll
not callingOnBegin
andOnEnd
.Update 23/07:
IUndoableAction
(if they implement IDisposable) when they are removed from undo stack. It allows to free resources kept in case the action is undone/redone.IUndoRedoManager
when the document is closed to dispose all the IUndoableAction remaining in the stack.