Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Clear all diagram links (Read 2841 times)
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 153
Location: England
Joined: Oct 23rd, 2006
Clear all diagram links
Apr 16th, 2019 at 3:39pm
Print Post  
I am trying to clear all DiagramLinks..

            // Clear out old links
            int count = flowChart.Links.Count;
            flowChart.Links.Clear();
            count = flowChart.Links.Count;

After the call to 'flowChart.Links.Clear()' the count of links is the same.  Am I doing something wrong here?

DavidL
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Clear all diagram links
Reply #1 - Apr 17th, 2019 at 7:55am
Print Post  
This seems broken since the 6.0 release, apparently caused by "Diagram item collection types now implement the generic IList interface" change. This build should fix it -
https://mindfusion.eu/_beta/links_clear.zip

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 153
Location: England
Joined: Oct 23rd, 2006
Re: Clear all diagram links
Reply #2 - Apr 18th, 2019 at 9:48am
Print Post  
Thanks. This set of DLLs seem to be unsigned. My build references the CLR4 Signed DLLs. Can you provide this set?

Regards
DavidL

Edit:  Don't worry I have done a workaround...

            foreach (var box in flowChart.Nodes)
                foreach (var link in box.OutgoingLinks.Clone())
                    flowChart.Links.Remove(link);
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Clear all diagram links
Reply #3 - Apr 18th, 2019 at 11:41am
Print Post  
Here's signed assemblies -
https://mindfusion.eu/_beta/links_clear.zip

Our version also takes care of undo / redo Wink

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint