Inglonias/VGraph

Make move operations specifically undoable

Opened this issue · 0 comments

Allow users to undo moving labels and lines.

Implementation:

  • Have the program track whether the last change to the grid was a move operation, along with which elements were moved.
  • Combine all move operations that involve the same elements
  • Once the user does something that doesn't involve that group of elements, add the new state to the undo stack.

The trickiest part of this is the situation where a user moves an element or set of elements, and then selects a different element or group of elements to move. We can't just assume that once the user stops moving lines, that's when we can add the undo state. It may be necessary to change the way undo and redo are handled away from simply saving copies of every element, and instead transitioning to a delta object of some sort.