Hi lads,
I have a little block of code inside the sliderValueChanged() listener which makes several calculations every time a slider value is changed. Unfortunately, resetting the slider by double-clicking doesn’t call sliderValueChanged().
Is this normal?
Bump.
Can somebody confirm if that’s a bug or a feature?
daniel
March 13, 2021, 2:00pm
3
I just checked here:
&& style != IncDecButtons
&& normRange.start <= doubleClickReturnValue
&& normRange.end >= doubleClickReturnValue;
}
void mouseDoubleClick()
{
if (canDoubleClickToValue())
{
DragInProgress drag (*this);
setValue (doubleClickReturnValue, sendNotificationSync);
}
}
double getMouseWheelDelta (double value, double wheelAmount)
{
if (style == IncDecButtons)
return normRange.interval * wheelAmount;
auto proportionDelta = wheelAmount * 0.15;
auto currentPos = owner.valueToProportionOfLength (value);
It sends a notification, and in my code I got a breakpoint there when I double click.
Any chance it’s in your code why it doesn’t react?
I have overridden sliderValueChanged() like this:
void sliderValueChanged(juce::Slider* slider) override;
then I have attached the listener:
testSlider.addListener(this);
and then only moving the slider triggers this method, but not double-clicking/resetting:
void TestAudioProcessorEditor::sliderValueChanged(juce::Slider* slider)
{
DBG("Test");
}