Skip to content

Commit

Permalink
Scope RMB on Trigger Type resets value (#6921)
Browse files Browse the repository at this point in the history
Make sure to send value changed to the correct boject.

Addresses #6778
  • Loading branch information
baconpaul authored Apr 9, 2023
1 parent 9248675 commit f762fba
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/surge-xt/gui/overlays/Oscilloscope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,14 @@ int32_t Oscilloscope::controlModifierClicked(Surge::GUI::IComponentTagValue *pCo
contextMenu.addItem(op.first, true, (val == pControl->getValue()),
[val, pControl, this]() {
pControl->setValue(val);
valueChanged(pControl);

// The switch button is self-draw and has its own value change
// so we need to handle that eventuality here
auto sc = dynamic_cast<SwitchButton *>(pControl);
if (sc)
sc->valueChanged(pControl);
else
valueChanged(pControl);

auto iv = pControl->asJuceComponent();

Expand Down

0 comments on commit f762fba

Please sign in to comment.