QM  7.0.0
Model-Based Design Tool
Loading...
Searching...
No Matches
Undo/Redo

Cut/Copy/PasteLocking Model Items

QM™ supports   undoing and   redoing of all actions that change the model in any way, such as:

  • creating or deleting a model item
  • changing any property of a model item
  • changing any graphical element in a diagram
  • changing canvas size of a diagram
  • reordering the items in the model
  • editing a file
Note
For the purposes of undo/redo QM™ keeps track only of the editing actions listed above and does not keep track of other actions, such as browsing the model, zooming/scrolling of diagrams, etc., which do not change the underlying model.

Clean and Edited Model Indicator

After a model is created, opened, or saved to disk, the model is marked as “clean”.

Toolbar File

Any editing action changes the model status to “edited”, which shows as a star after the model name in the QM's title bar.

Toolbar File

The model can become "clean" again after the undo actions bring it back to the original state.

The Undo/Redo Stack

QM™ keeps track of all model editing actions in the undo/redo stack, which operates as follows.

Undo stack

Every model edit action is pushed on top of the undo/redo stack. If there are any undoable actions above the current top of stack, all these actions get discarded, so that the most recent action sits at the top of stack.

The Undo command reverses the effect of the action pointed to by the "top of stack" and moves the top of the stack one level toward the older actions. As long as any editing actions are available for undoing, the undo command is enabled both in the Edit Menu as well as in the Edit Toolbar. The Undo command is also available under the standard keyboard shortcut Ctrl+Z.

The Redo command moves the top of the stack one level toward the newer actions and re-applies the action pointed to by the new "top of stack". As long as any actions are available above the current "top of stack", the redo command is enabled both in the Edit Menu as well as in the Edit Toolbar. The Redo command is also available under the standard keyboard shortcut Ctrl+Y.

Note
Unlike most programs with the Multiple Document Interface (such as IDEs), which use a separate undo/redo stack for each document, QM™ uses just one undo/redo stack for all editing actions. However, when recording actions on the undo stack, QM™ keeps track of the various editors/diagrams associated with the actions, so that when you undo the actions QM™ can open up the appropriate editor/diagram for each action you undo or redo.

Undo/Redo Stack Depth Limit

The value of undo/redo is high for recent editing actions, but diminishes quickly for older actions that are pushed down the undo/redo stack. Because the value of the old actions is very low, there is not much use to keep all the undo actions forever. Therefore the depth of the QM™ undo stack is limited, currently to 16 levels of undo.

Undo/Redo and Editing Text

QM™ uses text editors extensively to edit action code associated with state machines, to edit files for code generation, and to edit the documentation. The undo/redo feature works for editing text as expected, whereas you can undo each individual edit. However, as soon as you apply an editing action outside of the current text editor, the QM™ undo stack collapses all these editing actions into just one edit.

Cut/Copy/PasteLocking Model Items