Closed tassaron closed 7 years ago
As of 22978a0635e906f8ebfa1de81cdc38fd96aad756, the following actions are undoable:
Components may temporarily disable the merging of change actions as a cheap way to distinguish a memorable change from a minor change, e.g., clicking the [...] button vs. typing one character in a filepath.
Any component setting not represented by a widget must have a custom action defined, which is currently only used for the Conway's Game of Life component.
Opening a project or creating a new project clears the undo list.
Undo/redo functionality is essential for an editing program of any kind. Qt has an Undo Framework that seems straightforward to use, but it requires changing every potential user action into a
QUndoCommand
object and giving it a correspondingundo
method. So this feature will require a lot of code changes.The undo stack will only be used for the main window and component widgets. Components should be easy to convert by changing code in one place (
component.py
). The biggest thing is changing the component list actions and preset actions inmainwindow.py
andpresetmanager.py
.Hotkeys should be the standard
Ctrl-Z
for undo andCtrl-Shift-Z
/Ctrl-Y
for redo. There could be undo/redo buttons next to the Projects button in the GUI.