Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ResizeToFitItems(), ModifyItemCmd and undo (Read 1454 times)
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
ResizeToFitItems(), ModifyItemCmd and undo
May 14th, 2014 at 9:05pm
Print Post  
I am using a ModifyItemCmd to record the changes made to a shape node.

At the same time, Diagram.ResizeToFitItems() is being called to make sure the view size correctly matches the bounds of the items on it.

However, when I do an undo, ResizeToFitItems() is not accounted for and the scrollbars do not change.

Is there a way to easily wrap this into the undo composite stack?

Or is the only way to create a custom undo command?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ResizeToFitItems(), ModifyItemCmd and undo
Reply #1 - May 15th, 2014 at 7:14am
Print Post  
You can find a custom command that does that here:
http://mindfusion.eu/Forum/YaBB.pl?num=1290792836/6#6

Alternatively, you could call ResizeToFitItems from ActionUndone and ActionRedone event handlers.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint