Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic undo redo (Read 1671 times)
Kalex
YaBB Newbies
*
Offline



Posts: 8
Joined: May 18th, 2006
undo redo
Jun 14th, 2006 at 8:19pm
Print Post  
Arrow created event is not fired when undo/redo happens.  Is it possible to make these events fire?

Thanks,
  

Ken
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: undo redo
Reply #1 - Jun 15th, 2006 at 6:40am
Print Post  
At this time ArrowCreated is raised only when an arrow is drawn interactively.

You can detect that an arrow is re-created via undo/redo by handling the ActionUndone and ActionRedone events. Check if the type of a redone command is AddItemCmd, or if the type of an undone command is RemoveItemCmd. If that's true, the Item property of the command object holds a reference to the object that is added to the flowchart via undo/redo.

Deleting an arrow when undo is enabled does not actually delete the Arrow object, but merely removes it from the flowchart and nodes collections that refer to it. So when that's undone, you will get the exactly same object as the original, including any property changes you might have done in the ArrowCreated event.

Stoyan
  
Back to top
 
IP Logged
 
Kalex
YaBB Newbies
*
Offline



Posts: 8
Joined: May 18th, 2006
Re: undo redo
Reply #2 - Jun 15th, 2006 at 9:57pm
Print Post  
Thanks Stoyan.
  

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