Breaking Change in TreeView & Custom Component

Hi!

I just upgraded from JUCE 6.0.7 to JUCE 6.1.2.
First of all congratulations on the new release.

But it seems there was added a breaking change to the TreeView class, when you create your own custom TreeViewItems using createItemComponent().

The breaking change is:
The TreeView now adds a mouseListener to the created custom component. It did not do that before. And as a result I can no longer control the mouse behaviour through my custom component. In my case I do NOT want items to get selected on right-click. Before I could do that using my custom component. But because the TreeView now adds a mouseListener, that does no longer work.

Here is the change, which introduced the mouseListener (it was in the Added VoiceOver (macOS) and Narrator (Windows) commit). The screenshot is from the file “juce_TreeView.cpp”:

Would it be possible to make that optional?
I.e. add a function “doNotAddMouseListenerToCustomComponents()” or similar :slight_smile:
Then I could decide myself, if I want the TreeView to listen to mouse events on my custom component, or not.

Thanks for reporting. This was an unintentional change in behaviour and the old behaviour should now be restored on develop here:

Thanks for the quick response!