Skip to content

Commit

Permalink
Broadcast MSEG State at correct time (#5842)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
baconpaul authored Jan 30, 2022
1 parent e703371 commit 2fa82e8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/surge-xt/gui/SurgeGUIEditorOverlays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2fa82e8

Please sign in to comment.