We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Do() and Undo() suite

Hi, I use both methods ''do()'' and ''undo()'' provided by Diagram Class. If I do() 6 commands on the diagram and after I undo() 3 commands, I can undo() more 3 commands. But now, if I decide to do() a new command, logically three last command will be destroyed. It''s not the case of the diagram. Please can you give me a way to fix it ? THX!

4 Replies

AD Administrator Syncfusion Team April 13, 2006 01:26 PM UTC

Hi, Thanks for your interest in Syncfusion. I am looking into this issue and will provide you with an update within two days. Regards, Praveena.


NE Newlab April 19, 2006 01:24 PM UTC

Any news regarding this feature? thanks Jonathan Urban.


AD Administrator Syncfusion Team April 20, 2006 06:38 AM UTC

Hi, My apologies for the delay in getting back to you. The feature you are requesting can be implemented by clearing the Undo/Redo stack instantly by calling the DiagramController.ClearHistory () method. The DiagramController.ClearHistory () method will be used to remove all the commands from the undo and redo stacks. If you want to clear any one of the stack and leave the remain unchanged, the way to accomplish this would be by customizing the DiagramController class , providing suitable code implementation for the UndoCommand()/RedoCommand() override methods and calling the undoStack.clear()/redoStack.clear() methods at the required place. The undoStack() contains/maintains all the Undo commands and the redoStack() contains/maintains all the Redo commands. Please let me know if you have any questions. Thank You, Praveena.


AD Administrator Syncfusion Team April 20, 2006 06:56 AM UTC

Hi Jonathan Urban, Also DiagramController.undoStack/redoStack are the stack objects that will let you get hold of the commands that can have Undo/Redo applied. I forgot to mention this in the previous update. I am sorry about this. Thank You, Praveena.

Loader.
Live Chat Icon For mobile
Up arrow icon