When selecting a TreeViewItem, there is no way to prevent the event notification to be triggered. There are times when it is useful to inhibit such behaviour, because the TreeView selection is being updated programmatically to reflect some internal state of the application, and not because of user interaction.
The goal could be achieved by adding a boolean “sendNotification” argument to TreeViewItem::setSelected, with “true” as default value in order not to break existing code, which will prevent the “itemSelectionChanged” method to be called at the end of the function in case it is false.
Yes… I’ve been meaning to go through all the methods which have a “don’t broadcast a change message” parameter, and change them to all use a standard enum instead of a bool, because there’s some inconsistency between them at the moment. I guess I don’t really want to add a bool for this method until I’ve done that.
noticed the change to ScrollBar, very much appreciated waiting for the one to Button::setToggleState(…)
out of pure curiosity, how do you keep track of all the TODO things that arise from forum discussions? They spread over a wide range of topics and I’m sure it’s not easy to switch context so frequently, how do you cope with that?
[quote=“yfede”]noticed the change to ScrollBar, very much appreciated waiting for the one to Button::setToggleState(…)
out of pure curiosity, how do you keep track of all the TODO things that arise from forum discussions? They spread over a wide range of topics and I’m sure it’s not easy to switch context so frequently, how do you cope with that?[/quote]
it could be useful if all the ScrollBar::setCurrentRange… methods that involve changing the current range were added the “send notification” argument, not just the one that takes a Range as its argument