Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Dirty flag when selection of item changes (Read 2291 times)
Christoph_F
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Jan 13th, 2012
Dirty flag when selection of item changes
Jan 13th, 2012 at 8:18am
Print Post  
Hi Mindfusion support team,

in the WPFDiagram library the Dirty flag gets set to true as soon as a DiagramItem gets selected. In our project we are using the Dirty flag to indicate if we have pending changes (enabling save button and notifying the user of unsaved changes). This is really annoying for the user as he has not really changed anything in the diagram.

Would it be possible to remove this behavior and set the Dirty flag only if there was really a change.

thanks,
Christoph
  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Dirty flag when selection of item changes
Reply #1 - Jan 13th, 2012 at 8:41am
Print Post  
When I set breakpoint into DirtyChanged event hadler I see the same bahavior as topic starter. But it goes into this handler 2 times: first with Dirty == true and second with Dirty == false. That's why in our project this behavior doesn't disturb the user
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Dirty flag when selection of item changes
Reply #2 - Jan 13th, 2012 at 8:43am
Print Post  
Hi Christoph,

The control saves the selection state of items too when you call SaveToXml, so the Dirty flag is set when selection changes. You could set your own bool flag from handlers of the following events if you wish to ignore selection changes:

NodeCreated,NodeModified,NodeDeleted,NodeTextEdited
LinkCreated,LinkModified,LinkDeleted,LinkTextEdited

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint