Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram.Links.Clear() bug? (Read 1727 times)
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
Diagram.Links.Clear() bug?
Nov 21st, 2012 at 4:36pm
Print Post  
We recently upgraded to MindFusion FlowChart.NET Pro 6.0, and in our code the one call to Diagram.Links.Clear() no longer removes the items in the links collection.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram.Links.Clear() bug?
Reply #1 - Nov 21st, 2012 at 6:35pm
Print Post  
This shouldn't have worked in previous versions either. If you need to remove everything, call the ClearAll method of Diagram. Removing all links but no nodes should look like this:

Code
Select All
var allLinks = diagram.Links.Clone();
foreach (DiagramLink link in allLinks)
	diagram.Links.Remove(link); 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
Re: Diagram.Links.Clear() bug?
Reply #2 - Nov 21st, 2012 at 6:57pm
Print Post  
Okay, that'll work. Thanks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint