From 8a95fb1c82426adc7d5210e0b5f8b917b0c7f0b8 Mon Sep 17 00:00:00 2001 From: reuk Date: Tue, 9 Nov 2021 19:31:49 +0000 Subject: [PATCH] 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. --- .../utilities/juce_ParameterAttachments.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/juce_audio_processors/utilities/juce_ParameterAttachments.cpp b/modules/juce_audio_processors/utilities/juce_ParameterAttachments.cpp index c46a67d469..24ee3c1d63 100644 --- a/modules/juce_audio_processors/utilities/juce_ParameterAttachments.cpp +++ b/modules/juce_audio_processors/utilities/juce_ParameterAttachments.cpp @@ -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()); } //==============================================================================