is called when an undo action is added to the undo stack.
Note that the action must not necessarily be the new top element of the stack: In case there's an
open Undo context, UndoManagerEvent::UndoContextDepth will be greater 0,
and the newly added action will be subordinate of the context action.
is called when an Undo context has been left, but no actions have been added within this context.
In such a case, the context which has just been left will not contribute to the undo stack, but instead
be silently removed. Consequently, the UndoManagerEvent::UndoActionTitle is empty.