Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Arrow Deleted Event (Read 1577 times)
pelion
Junior Member
**
Offline



Posts: 61
Joined: Nov 12th, 2006
Arrow Deleted Event
May 7th, 2008 at 9:17am
Print Post  
Hi Stoyo,

I am having some issues on a chart that I have tracked to the ArrowDeleted event being fired when the Chart.ClearAll is called, as well as when a user deletes an arrow.

Is there anyway to limit when this event fires, or once it has fired, what the Action that caused it was?

Thanks in advance
JC
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrow Deleted Event
Reply #1 - May 7th, 2008 at 10:36am
Print Post  
Hi JC,

Indeed, raising Deleted events in response to method calls is very inconsistent with how the rest of the events work. We'll probably fix this in a future release. Until then you will have to keep track of the event context yourself, for example:

Code
Select All
boolean cleanup = false;

void someMethod()
{
	cleanup = true;
	diagram.ClearAll();
	cleanup = false;
}

void diagram_LinkDeleted(...)
{
	if (!cleanup)
		...
}
 



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



Posts: 61
Joined: Nov 12th, 2006
Re: Arrow Deleted Event
Reply #2 - May 7th, 2008 at 10:25pm
Print Post  
That's pretty much how I've handled it, just wondered if there was anything inbuilt.

Thanks again
JC
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint