Commit Graph

9 Commits (master)

Author SHA1 Message Date
Richard Stanway 3ce12bc5e9
UI: Optimize undo/redo functions with constant references 2022-01-19 21:39:43 +01:00
jp9000 1afe092c6e UI: Add disable push/pop to undo/redo stack
This allows disabling and re-enabling in certain situations where these
actions doing so might end up being used in recursion.
2021-05-12 21:35:11 -07:00
jp9000 edc82eb7cf UI: Use "enabled" instead of "disabled" variable name
Avoids double-negative naming.
2021-05-12 21:35:03 -07:00
jp9000 b86999e133 UI: Rename enable/disable funcs for undo/redo stack 2021-05-12 21:13:56 -07:00
jp9000 ae5ac8fa82 UI: Add repeat protection for Undo/Redo
This allows the ability to mark an action as repeatable, which when set,
makes it so that it will change only the redo value for the last undo
item in the undo stack within the last three seconds. This allows the
ability to, for example, scroll a spinbox or change a slider value
without creating many unnecessarily duplicated undo/redo actions.
2021-04-27 20:45:43 -07:00
jp9000 78f1983f7d UI: Remove unnecessary Undo/Redo cleanup func
Since fixing the reference holding issue with scene/source deletion, the
undo/redo cleanup function (last param of add_action) is no longer
required.
2021-04-27 20:45:43 -07:00
jp9000 8515f38bdb UI: Make undo_stack types in-class and private
Reduces polluting the global namespace
2021-04-16 20:31:57 -07:00
Ford Smith 0b583260a2 UI: Wipe undo/redo stack when switching scene collections 2021-04-08 16:45:04 -07:00
Ford Smith eced5a320b UI: Initial Undo/Redo
Starting to develop Undo/Redo. This just implmements the undo/redo stack
and its api.
2021-03-29 03:06:26 -04:00