Undo project - #3995
Conversation
Thought this was already here but apparently not.
Old way was throwing errors because symbol lookup doesn't have any of the inverse units (or indeed units of any other dimension).
accepted is a slot not a value.
Was previously always returning an empty set.
krzywon
left a comment
There was a problem hiding this comment.
Overall, this is looking very promising, but I'm seeing some undo/redo that aren't repeatable. I'll take a deeper dive into the code soon, but I did make a couple of suggestions.
After changing the scale value to 0.5, then clicking compute:

Clicking undo shows no plot changes, but the scale value changes:

Undo again and the plot changes:

Redo twice to get back to the head of the stack and the scale is back to 0.5, but the plots aren't updated:

krzywon
left a comment
There was a problem hiding this comment.
The issues I was seeing previously are now resolved. This seems to work pretty well and will be a welcome feature!
Two things that need resolving before merging:
- Is this meant to point toward
mainorrafactor_24? This is pulling in the ASCII dialog and MetaData GUI is why I ask. - There is a merge conflict in
config.py.
|
Thanks, @krzywon !
It' supposed to be merged with
|
|
I think this branch is based on the refactor branch even though this PR is pointing to main which is why we're seeing a lot of lines in the diff that are not related to this change. @rozyczko would you be able to rebase this branch onto main? It'll make it easier to review. |
Description
Added Undo/Redo functionality, tied to the GUI taskbar components.
This works in all perspectives and reverses any user input in any textfield.
This PR is against main, since I think the feature is important to be added to the next release.
The PR has a bunch of unrelated changes coming from rebasing against the recent
main.How Has This Been Tested?
Tested locally, added a number of unit tests.
Review Checklist:
[if using the editor, use
[x]in place of[ ]to check a box]Documentation (check at least one)
Installers
Licensing (untick if necessary)