Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Logic gates demo (Read 1711 times)
billcollis
YaBB Newbies
*
Offline


I love mindfusion

Posts: 19
Location: Auckland, NZ
Joined: Jun 4th, 2011
Logic gates demo
Apr 18th, 2015 at 1:06am
Print Post  
I was using the Logic Gates demo and I notice that when a diagram is saved and then reopened that the number of the node counter starts from 0, and not from the highest numbered nodes in the opened diagram.

If the diagram is modified after opening and then the result is generated it can crash.

Just need to change it so that the counter variable is updated using the highest value from nodes tags in the opened diagram

I added this to the code I have used from the demo

            string[] s;
            int i=-1;
            counter = -1;
            foreach(DiagramNode node in diagram.Nodes)
            {
                s = node.Tag.ToString().Split('|');
                i = Convert.ToInt32(s[1]);
                if (i>counter)
                    counter=i;
            }
 


Thanks again for great product
Bill
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Logic gates demo
Reply #1 - Apr 20th, 2015 at 7:12am
Print Post  
Thanks for notifying us about the problem, we'll fix this for next release.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint