Skip to content
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

Add undo/redo #10

Open
2 of 7 tasks
Kangaroux opened this issue Apr 27, 2021 · 0 comments · May be fixed by #24
Open
2 of 7 tasks

Add undo/redo #10

Kangaroux opened this issue Apr 27, 2021 · 0 comments · May be fixed by #24
Labels
scope:ui React components, hotkeys, etc. Anything NOT related to the canvas work:new-feature New feature requests

Comments

@Kangaroux
Copy link
Contributor

Kangaroux commented Apr 27, 2021

Performing a reversible action adds it to the undo stack. If the user presses undo, the change is reversed, and it's moved to the redo stack. Likewise the user can press redo to re-apply it and move it back to the undo stack.

The redo stack should be cleared when the user performs a new action.

  • Keep track of actions taken using a stack
  • Add a method to Action which undoes the change
  • Add a keybind for triggering undo
  • Handle undo action
  • Add a keybind for triggering redo
  • Handle redo action
  • Take an inventory of all the things which should be undoable and create actions for things which are missing
@Kangaroux Kangaroux added work:new-feature New feature requests scope:ui React components, hotkeys, etc. Anything NOT related to the canvas labels Apr 27, 2021
@Kangaroux Kangaroux changed the title Add undo/redo for placing/deleting notes Add undo/redo Oct 14, 2021
@Kangaroux Kangaroux linked a pull request Oct 14, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:ui React components, hotkeys, etc. Anything NOT related to the canvas work:new-feature New feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant