IUndoRedoManagerTInUndoRedo Property |
Gets a value indicating if the history is in the process of undoing or redoing.
Namespace: RAYLASE.Marker.UndoRedoAssembly: RAYLASE.Marker.UndoRedo (in RAYLASE.Marker.UndoRedo.dll) Version: 2.19.0
Syntax
Remarks
This property is extremely useful to prevent undesired "Do" being executed.
That could occur in the following scenario:
event X causees a Do action and certain Undo / Redo action causes event X,
i.e. Undo / Redo causes a Do action, which will render history in a incorrect state.
So whenever Do is called, the status of
InUndoRedo
should aways be checked first. Example:
void SomeEventHandler()
{
if(!history.InUndoRedo)
history.Do(...);
}
See Also