UndoManager¶
- MLModule¶
genre
author
package
dll
definition
keywords
Purpose¶
The module UndoManager provides an undo context that may be plugged into other modules that are designed to use it.
Usage¶
Connect the output of this module to all other modules with appropriate input connectors that should share the same undo context. The module panel shows the available undo/redo steps and the buttons to trigger them.
Details¶
An undo context is a series of actions that can be undone or redone to achieve a previous or later state of an edited object, document, etc.
Steps on the undo stack are automatically pushed to the redo stack when they are undone, and vice versa.
Tips¶
Disconnecting a module from this module will not only remove all undo steps of that module irrevocably, but also all steps that came before/after on the undo/redo stack, since it is assumed that preceding/later object/document states can’t be restored without these missing steps. The state of the object/document should not be changed by this.
Steps that can be undone independently probably should be handled by different undo contexts. The application developer is responsible for identifying suitable undo contexts and handling access to their undo/redo operations.
Windows¶
Default Panel¶
Output Fields¶
outUndoContext¶
- name: outUndoContext, type: UndoContext(MLBase)¶
Connect this to the same-typed input of modules with undoable operations.
For accessing this object via scripting, see the Scripting Reference:
MLUndoContextWrapper.
Parameter Fields¶
Field Index¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Visible Fields¶
Clear¶
- name: clear, type: Trigger¶
When pressed, the undo/redo stack is cleared.
Undo¶
- name: undo, type: Trigger¶
When pressed, an undo operation in the current undo context (if available) is performed.
Redo¶
- name: redo, type: Trigger¶
When pressed, a redo operation in the current undo context (if available) is performed.