Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Extend undo/redo to other controls. (Read 958 times)
hrumayor
YaBB Newbies
*
Offline



Posts: 24
Location: Canada
Joined: Jun 3rd, 2009
Extend undo/redo to other controls.
Oct 30th, 2009 at 3:09pm
Print Post  
Hi,

I want to extend the undo/redo to include other controls around the diagram that have interactions with it, I am aware that you can create new commands and add them to the UndoRedoManager but I still have issues how to link this to other controls to extend the commands.

for example if a diagram node is deleted on the diagram also a command to delete it from another control is required and it's undo operation, the way that the commands are hidden from the user does not make it clear to me how to achieve this.

Do you have any ideas of how to do this?

Regards,
Hugo
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Extend undo/redo to other controls.
Reply #1 - Oct 30th, 2009 at 4:23pm
Print Post  
Hi,

You could create your own commands in response to the ActionRecorded event raised for the diagram's operation, and call MergeUndoRecords to make the diagram's action and the custom action undo/redo together.

It might also be possible to add the custom records as children of the diagram's record by calling AddSubCmd instead of MergeRecords.

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