Hi Jules !
There’s an unwanted behaviour in the Slider class when dealing with mouse wheel events over a Linear Bar slider.
For each mouse wheel move, the Linear Bar slider get two consecutive events… making it impossible to have fine value changes… !
Here is the point:
The Linear Bar slider registers as a MouseListener on its value box (In juce_Slider.cpp, line 346).
When the mouse wheel move, the value box component receives the internal mouse wheel callback and:
- first call its own mouseWheelMove() (inherited from Component) whose default behaviour (in juce_Component.cpp, line 2130) is to pass the event up to the parent (the slider)
- and then call mouseWheelMove() on all its MouseListeners (including the slider)
This results in having the Slider::mouseWheelMove called twice …
I find a bit strange to have a Component::mouseWheelMove() default behavior whereas all the other MouseListener methods are empty in Component…
AFAIK, this default behavior is made for scrollbars… but unfortunately induces weird behaviours for some other components…
I haven’t find any solution not preventing either the Sliders or the Scrollbars to work so far.
Any idea ?
PS: I’ve not tried the last tip, i’m using r707 but haven’t seen any related SVN changes since then.