Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic UndoManager (Read 1252 times)
chinlean
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 6
Joined: Jan 17th, 2007
UndoManager
Feb 15th, 2007 at 11:58pm
Print Post  
I am deleting a node from FlowChart.NET and some code was executed to modify predefined data structure (remove something from collection) When I'm undo this opertion using UndoManager.Undo() the node was restored but the data structure is out of sync. Is there any event triggered to the box or is there anywhere i can handle such scenerio? I'm using Flowchart.NET 4.2.1
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: UndoManager
Reply #1 - Feb 16th, 2007 at 6:46am
Print Post  
Hi,

One way to do that is to handle the ActionUndone event. If the command being undone is of type RemoveItemCmd, modify your structure as needed.

It might also be possible to do that by defining a Command-derived class that modifies your data structures. When deleting a box, enclose the fc.DeleteBox call and your command between fc.UndoManager.StartComposite() and composite.Execute().

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint