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

Undo/Redo fails if switching to different SuperNode #28

Closed
bkiefer opened this issue Feb 16, 2019 · 5 comments
Closed

Undo/Redo fails if switching to different SuperNode #28

bkiefer opened this issue Feb 16, 2019 · 5 comments
Labels
bug Something isn't working high

Comments

@bkiefer
Copy link
Owner

bkiefer commented Feb 16, 2019

This could be fixed by clearing the UndoManager, but maybe that's not what's desired.

@bkiefer bkiefer added bug Something isn't working enhancement New feature or request question Further information is requested labels Feb 16, 2019
@aWelker
Copy link
Collaborator

aWelker commented Feb 25, 2019

Alternatively: Each SuperNode could maintain its own UndoManager. This would allow to switch between different parts of the graph and always be able to undo changes you did to the current environment

@bkiefer
Copy link
Owner Author

bkiefer commented Jun 5, 2020

To reproduce:

  • Create supernode, change into supernode, undo: NullPointerException
  • Create supernode, change into supernode, create node, change to parent, undo, undo --> node created in new supernode is now in parent

@bkiefer
Copy link
Owner Author

bkiefer commented Jun 5, 2020

Possible solutions:

  1. separate Undo managers for all active super nodes
    • When the supernode stack is "popped", the undo managers for the respective supernodes are dropped or not?
    • That would mean that you can only undo things in the current supernode
  2. The actions get a SuperNode field and act on the right model.
    • Issue a warning if undoing/redoing things outside the current view!?
  3. Changing the SuperNode clears the undo/redo manager. This might be an interim solution until there is a better one

@bkiefer bkiefer added high and removed enhancement New feature or request question Further information is requested labels Jun 6, 2020
@bkiefer bkiefer closed this as completed in 245a7e1 Jun 6, 2020
@bkiefer
Copy link
Owner Author

bkiefer commented Jun 6, 2020

Possible solutions:

  1. separate Undo managers for all active super nodes
    • When the supernode stack is "popped", the undo managers for the respective supernodes are dropped or not?
    • That would mean that you can only undo things in the current supernode
  2. The actions get a SuperNode field and act on the right model.
    • Issue a warning if undoing/redoing things outside the current view!?
  3. Changing the SuperNode clears the undo/redo manager. This might be an interim solution until there is a better one

@bkiefer bkiefer reopened this Jun 6, 2020
@bkiefer
Copy link
Owner Author

bkiefer commented Jun 20, 2020

fixed by 5d979d7

@bkiefer bkiefer closed this as completed Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high
Projects
None yet
Development

No branches or pull requests

2 participants