1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

SliderParameterAttachment: Allow right-click to change parameter value

Previously, right-clicking on a slider could change its value, but the
parameter value would not be changed, leaving the slider in a different
state to the parameter.
This commit is contained in:
reuk 2021-11-09 19:31:49 +00:00
parent 6f80be1edb
commit 8a95fb1c82
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

View file

@ -180,10 +180,8 @@ void SliderParameterAttachment::setValue (float newValue)
void SliderParameterAttachment::sliderValueChanged (Slider*)
{
if (ignoreCallbacks || ModifierKeys::currentModifiers.isRightButtonDown())
return;
attachment.setValueAsPartOfGesture ((float) slider.getValue());
if (! ignoreCallbacks)
attachment.setValueAsPartOfGesture ((float) slider.getValue());
}
//==============================================================================