From 2fa82e8d4e92cc81463b9cc12c1d706b8faf35d0 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 29 Jan 2022 19:15:33 -0500 Subject: [PATCH] Broadcast MSEG State at correct time (#5842) BroadcastMSEGState should be set up at open as a close callback but instead was called at open. Fix while retaining lfo switch toggle. Closes #5841 --- src/surge-xt/gui/SurgeGUIEditorOverlays.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/surge-xt/gui/SurgeGUIEditorOverlays.cpp b/src/surge-xt/gui/SurgeGUIEditorOverlays.cpp index ff77e34ae2f..bcc8b543f29 100644 --- a/src/surge-xt/gui/SurgeGUIEditorOverlays.cpp +++ b/src/surge-xt/gui/SurgeGUIEditorOverlays.cpp @@ -366,8 +366,15 @@ void SurgeGUIEditor::showOverlay(OverlayTags olt, switch (olt) { case MSEG_EDITOR: - broadcastMSEGState(); - // no break on purpose + onClose = [this]() { + broadcastMSEGState(); + if (lfoEditSwitch) + { + lfoEditSwitch->setValue(0.0); + lfoEditSwitch->asJuceComponent()->repaint(); + } + }; + break; case FORMULA_EDITOR: onClose = [this]() { if (lfoEditSwitch)