From 8f010fd0d7b8dbbe7f431c1519b6f862372c86f6 Mon Sep 17 00:00:00 2001 From: EvilDragon Date: Fri, 10 Dec 2021 23:45:52 +0100 Subject: [PATCH] Couple FX tweaks (#5616) Add double click to toggle FX slot bypass. Addresses 50% of #5613. Fix Spring Reverb default presets (Mix parameter wasn't loading correctly after Knock parameter was added) --- resources/surge-shared/configuration.xml | 8 ++++---- src/surge-xt/gui/widgets/EffectChooser.cpp | 9 +++++++++ src/surge-xt/gui/widgets/EffectChooser.h | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/resources/surge-shared/configuration.xml b/resources/surge-shared/configuration.xml index 39a8064c6ff..8aca741529c 100644 --- a/resources/surge-shared/configuration.xml +++ b/resources/surge-shared/configuration.xml @@ -138,9 +138,9 @@ + p6="0.000000" p7="0.500000"/> + p6="0.000000" p7="1.000000"/> @@ -151,8 +151,8 @@ p6="0.000000" p7="0.000000" p8="-60" p8_deactivated="1"/> - diff --git a/src/surge-xt/gui/widgets/EffectChooser.cpp b/src/surge-xt/gui/widgets/EffectChooser.cpp index e136cda3997..609f934a615 100644 --- a/src/surge-xt/gui/widgets/EffectChooser.cpp +++ b/src/surge-xt/gui/widgets/EffectChooser.cpp @@ -209,6 +209,15 @@ juce::Rectangle EffectChooser::getEffectRectangle(int i) return r; } +void EffectChooser::mouseDoubleClick(const juce::MouseEvent &event) +{ + if (!hasDragged && currentClicked >= 0) + { + deactivatedBitmask ^= (1 << currentClicked); + notifyValueChanged(); + } +} + void EffectChooser::mouseDown(const juce::MouseEvent &event) { if (forwardedMainFrameMouseDowns(event)) diff --git a/src/surge-xt/gui/widgets/EffectChooser.h b/src/surge-xt/gui/widgets/EffectChooser.h index 34cbbfc478f..013758c4e0b 100644 --- a/src/surge-xt/gui/widgets/EffectChooser.h +++ b/src/surge-xt/gui/widgets/EffectChooser.h @@ -52,6 +52,7 @@ struct EffectChooser : public juce::Component, public WidgetBaseMixin fxTypes; + void mouseDoubleClick(const juce::MouseEvent &event) override; void mouseDown(const juce::MouseEvent &event) override; void mouseUp(const juce::MouseEvent &event) override; void mouseDrag(const juce::MouseEvent &event) override;