Skip to content

Commit

Permalink
Supress LFO Reset Gestures (surge-synthesizer#772)
Browse files Browse the repository at this point in the history
The LFO display (the wav) handles double click and ctrl click
like any other control - reset to default value. That's really
bad in the LFO display though, since if you ccidentally control
click or double click on your step sequencer you go back to sin.
So supress this gesture for ct_lfoshape.

Closes surge-synthesizer#376
  • Loading branch information
baconpaul authored Mar 11, 2019
1 parent 24c0770 commit d7cdf68
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions src/common/gui/SurgeGUIEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1914,14 +1914,23 @@ int32_t SurgeGUIEditor::controlModifierClicked(CControl* control, CButtonState b
}
else
{
p->set_value_f01(p->get_default_value_f01());
control->setValue(p->get_value_f01());
if (oscdisplay && (p->ctrlgroup == cg_OSC))
oscdisplay->invalid();
if (lfodisplay && (p->ctrlgroup == cg_LFO))
lfodisplay->invalid();
control->invalid();
return 0;
/*
** This code resets you to default if you double click or ctrl click
** but on the lfoshape UI this is undesirable; it means if you accidentally
** control click on step sequencer, say, you go back to sin and lose your
** edits. So supress
*/
if (p->ctrltype != ct_lfoshape)
{
p->set_value_f01(p->get_default_value_f01());
control->setValue(p->get_value_f01());
if (oscdisplay && (p->ctrlgroup == cg_OSC))
oscdisplay->invalid();
if (lfodisplay && (p->ctrlgroup == cg_LFO))
lfodisplay->invalid();
control->invalid();
return 0;
}
}
}
else
Expand Down

0 comments on commit d7cdf68

Please sign in to comment.