Support undo/redo
Undo/Redo implementation is started (in Layer oriented sample editor). It's not finished so far, therefore the undo/redo buttons are hidden right now.
The current state is [23 Feb 2022]:
- Undo/Redo commands are located in
SampleEditorCommands.handSampleEditorCommands.cpp - These commands have to be called from
SampleEditorController. - Currently available commands are
- Undo/Redo changing a double value (
CommandChangeValue) - Undo/Redo adding a layer (
CommandAddLayer) - Undo/Redo deletion of a layer (
CommandRemoveLayer)
- Undo/Redo changing a double value (
- Undo/Redo buttons are always hidden by code in
LayerOrientedSampleEditor::updateActionEnabling()
To continue implementation please study the current implementation for understanding the principles like usage of the "path" of a DoubleDescriptor etc.
You can also study commit e10ae899 (contained in merge request !714 (merged)) to see how CommandAddLayer was added (how the original non-undo/redo code was modified to support undo/redo).
Edited by m.puchner