Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Question about the NodeModified event (Read 2162 times)
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
Question about the NodeModified event
Jul 9th, 2014 at 7:51pm
Print Post  
I am trying to perform some actions in a NodeModified event, and I want these changes to be added to the undo stack.

However, the undo command created in NodeModified does not seem to be added to the stack until after this event is called. So anything I add to the stack is placed before where it should be.

What I think I need is something like AfterNodeModified, or some way to do this. Any ideas?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Question about the NodeModified event
Reply #1 - Jul 10th, 2014 at 6:38am
Print Post  
We'll change NodeModified to fire after saving the undo record for next release. For time being, if you have the source code move the Parent.RaiseModified calls from end of DiagramNode/DiagramLink CompleteModify methods to the end of InteractionState.Complete. Or otherwise handle ActionRecorded event and save your custom commands if last one is ModifyCommand.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Question about the NodeModified event
Reply #2 - Jul 28th, 2014 at 6:07pm
Print Post  
This version raises NodeModified after saving the undo record:
http://mindfusion.eu/Forum/YaBB.pl?num=1406570009

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint