Skip to content

Command manager: is it possible to undo specific command? #2617

Discussion options

You must be logged in to vote

No, you cannot use the command manager this way. It's not possible to undo a specific command because one operation can affect subsequent operations.

For instance, consider an add operation followed by a change:color operation. If you undo the add operation, it removes the associated node. However, the change:color operation remains in the undo stack, referencing a node that no longer exists.

This scenario highlights the complexity that can be addressed by operational transformation (OT) techniques. Although OT provides a general solution, if your specific requirement is limited to undoing link reconnection operations, a simpler solution may suffice.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gintarasgraciovas
Comment options

Answer selected by gintarasgraciovas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants