From cb0440e1668364de60bed908d3cb2d75806f3db7 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Fri, 26 Nov 2021 15:31:19 -0500 Subject: [PATCH] Hide Param Typein on LastChance Closes #5506 --- src/surge-xt/gui/SurgeGUIEditor.cpp | 2 ++ src/surge-xt/gui/SurgeGUIEditor.h | 1 + src/surge-xt/gui/widgets/MainFrame.cpp | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/surge-xt/gui/SurgeGUIEditor.cpp b/src/surge-xt/gui/SurgeGUIEditor.cpp index 12d0b73d1e9..bb5841036c2 100644 --- a/src/surge-xt/gui/SurgeGUIEditor.cpp +++ b/src/surge-xt/gui/SurgeGUIEditor.cpp @@ -5622,6 +5622,8 @@ bool SurgeGUIEditor::isAHiddenSendOrReturn(Parameter *p) return false; } +void SurgeGUIEditor::hideTypeinParamEditor() { typeinParamEditor->setVisible(false); } + void SurgeGUIEditor::activateFromCurrentFx() { switch (current_fx) diff --git a/src/surge-xt/gui/SurgeGUIEditor.h b/src/surge-xt/gui/SurgeGUIEditor.h index 220ac59252a..51ac3db9407 100644 --- a/src/surge-xt/gui/SurgeGUIEditor.h +++ b/src/surge-xt/gui/SurgeGUIEditor.h @@ -535,6 +535,7 @@ class SurgeGUIEditor : public Surge::GUI::IComponentTagValue::Listener, bool setParameterModulationFromString(Parameter *p, modsources ms, int modsourceScene, int modidx, const std::string &s); bool setControlFromString(modsources ms, const std::string &s); + void hideTypeinParamEditor(); friend struct Surge::Overlays::TypeinParamEditor; friend struct Surge::Overlays::PatchStoreDialog; friend struct Surge::Widgets::MainFrame; diff --git a/src/surge-xt/gui/widgets/MainFrame.cpp b/src/surge-xt/gui/widgets/MainFrame.cpp index f39be5a58ec..84886009cfb 100644 --- a/src/surge-xt/gui/widgets/MainFrame.cpp +++ b/src/surge-xt/gui/widgets/MainFrame.cpp @@ -37,6 +37,8 @@ void MainFrame::mouseDown(const juce::MouseEvent &event) return; } + editor->hideTypeinParamEditor(); + if (event.mods.isMiddleButtonDown()) { editor->toggle_mod_editing();