Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Custom undo/redo in diagram (Read 2262 times)
venki5star
Junior Member
**
Offline



Posts: 82
Location: India
Joined: Mar 9th, 2010
Custom undo/redo in diagram
Oct 19th, 2010 at 11:37am
Print Post  
i have written a collection class to handle undo/redo. Below are the steps i followed to write my own undo/redo.

[code snippet] of my collection class:
List<NodeSnap> _Snaps = new List<NodeSnap>();

public class NodeSnap
{
       public string DiagramString
       {  get;   set; }
}


1) When ever new node has been added/draged the existing node, then diagram string to be saved inside my collection object.

2) Press "Ctrtl + z", that time i'll take the recent  diagram string from the collectin & load it in the diagram.

Reason why i'm storing the entire diagram string is, i do not want to show much difference to the user when they do undo/redo. But my approch seems to be like performace degrade.

Is there any other custom approach to handle my scenario?
  

Castle Rider
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Custom undo/redo in diagram
Reply #1 - Oct 19th, 2010 at 2:19pm
Print Post  
Is there anything wrong with the builtin undo/redo?
  
Back to top
 
IP Logged
 
venki5star
Junior Member
**
Offline



Posts: 82
Location: India
Joined: Mar 9th, 2010
Re: Custom undo/redo in diagram
Reply #2 - Oct 20th, 2010 at 3:11am
Print Post  
Yes, sometimes origin of the node is not retained properly.
  

Castle Rider
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Custom undo/redo in diagram
Reply #3 - Oct 20th, 2010 at 6:16am
Print Post  
Could you send us a sample project that reproduces that?
  
Back to top
 
IP Logged
 
venki5star
Junior Member
**
Offline



Posts: 82
Location: India
Joined: Mar 9th, 2010
Re: Custom undo/redo in diagram
Reply #4 - Oct 20th, 2010 at 6:57am
Print Post  
Soon i'll send you the project. How to send my sample project?? Through e-mail or attaching with the post?
  

Castle Rider
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Custom undo/redo in diagram
Reply #5 - Oct 20th, 2010 at 11:39am
Print Post  
Email it to support@mindfusion.eu please.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint