bkiefer / GraVE

Other
0 stars 0 forks source link

Undo/Redo fails if switching to different SuperNode #28

Closed bkiefer closed 4 years ago

bkiefer commented 5 years ago

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

aWelker commented 5 years ago

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 commented 4 years ago

To reproduce:

bkiefer commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

fixed by 5d979d71b6a45b6838cb00e20e8e695d61a53c8c