Have the ability to "redo" if you want to undo the undo. On an undo, push all events generated into a undoHistory stack. If one undo causes three events, place all three events as the next entry in the stack. Redo pops that and applies the events. Clear the undoHistory stack as soon as there is a non-undo, non-redo operation.
Have the ability to "redo" if you want to undo the undo. On an undo, push all events generated into a undoHistory stack. If one undo causes three events, place all three events as the next entry in the stack. Redo pops that and applies the events. Clear the undoHistory stack as soon as there is a non-undo, non-redo operation.