If i remove any elements from graphiti view followed by some other operation(say adding of elements), then on doing undo till the end of stack, my deleted elements will be added back but again if i perform redo only the removal of element is redone and the 2nd operation is not redone(at this point redo button gets disabled) as redolist is getting flushed.
This is happening if i perform delete operation in combination with other operation.
Michael Wenz Messages: 1790 Registered: July 2009 Location: Walldorf, Germany
Hm, not sure, but could it be that you trigger another feature (or recording
command) from your delete feature? In that case after processing the redo
this operation would replace whatever has been on the redo stack before.
The behavior is like:
- do operation1
- do operation2
- undo operation2
- undo operation1
- redo operation1
- do operation3
In that case operation3 would remove everything that was on the redo stack
Thanks for your response.
Redo problem gets fixed if we do a autoupdate(override isAutoUpdateAtRuntime()from AbstractDiagramTypeProvider class), but in case if we perform any other operation in normal scenario(suppose we have added a couple of elements to any node)then the updation of node fails and its not feasible to check the autoupdate for every operation in the application.
So the update operation is creating a mess while deleting any elements and subsequently if we do a undo and then redo.