Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic NodeModifying is not fired for multiple selected items (Read 1714 times)
Jan Lyson
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Dec 4th, 2019
NodeModifying is not fired for multiple selected items
Jan 17th, 2020 at 3:45pm
Print Post  
Hello,
I encounter an issue with a NodeModifying event. This event is fired properly when a single node is selected. Even NodeModified works fine. But when multiple nodes are selected NodeModifying event stops to be fired and NodeModified still works.

Can you please check if it is a bug?
Thanks
Jan

  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: NodeModifying is not fired for multiple selected items
Reply #1 - Jan 17th, 2020 at 3:53pm
Print Post  
Hi,

The diagram raises SelectionModifying event for multiple-selection, try handling that by calling your single-item-modifying code for each selected node.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Jan Lyson
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Dec 4th, 2019
Re: NodeModifying is not fired for multiple selected items
Reply #2 - Jan 17th, 2020 at 3:58pm
Print Post  
Hi,
you are right, I can do that, but it is still strange because NodeModified works for both cases single-selection and multi-selection. I would expect if the NodeModifying event is not fired when multi-selection is done, then even NodeModified shouldn't be fired also.

Jan
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: NodeModifying is not fired for multiple selected items
Reply #3 - Jan 20th, 2020 at 6:41am
Print Post  
Hi,

Modifying and Modified are raised for different things, former being validation events that let you give feedback to users or cancel the operation altogether. In SelectionModifying you have more context to decide whether modification should be cancelled, which you might not know from a single node in NodeModifying. Anyway we guess it won't hurt raising additional NodeModifying just for their notification aspect, we'll have it in mind for next release.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Jan Lyson
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Dec 4th, 2019
Re: NodeModifying is not fired for multiple selected items
Reply #4 - Jan 20th, 2020 at 7:30am
Print Post  
Hi,
I understand, but in my case, I don't need to know about context because I just need to run a simple code for every node when it is in modifying state. But as I wrote I can do it by calling this code from SelectionModifying event handler method for now. Adding additional raising of NodeModifying event would be fine.

Thank you
Jan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint