-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undo redo refactor #140
Undo redo refactor #140
Conversation
Codecov Report
@@ Coverage Diff @@
## master #140 +/- ##
============================================
+ Coverage 70.97% 71.32% +0.34%
- Complexity 734 745 +11
============================================
Files 125 127 +2
Lines 2384 2420 +36
Branches 270 271 +1
============================================
+ Hits 1692 1726 +34
- Misses 595 596 +1
- Partials 97 98 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Nice job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Closes #139
Change how undo and redo works. Now all the commands will call the method
Model#save()
to enable them to be undoable instead of each individual method inModel
saving state on its own.Every command is now undoable other that
help
andexit
, tried it out a bit and it feels more natural that every action made can be undone compared to how it was previously.Furthermore, undo and redo is now improved to be able to undo back to exactly how the screen was like for the user before he made the command. This is done by mapping each stored State to the correct view type for the Ui to use.