Skip to content

Commit

Permalink
Reset slider state on Keytrack state (#5840)
Browse files Browse the repository at this point in the history
WHen resetting a param to Filter Keytrack, make sure to reset
the slider internal state. This API remains a bit gross.

Closes #5814
  • Loading branch information
baconpaul authored Jan 29, 2022
1 parent 0874a1c commit e703371
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/surge-xt/gui/SurgeGUIEditorValueCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1592,6 +1592,13 @@ int32_t SurgeGUIEditor::controlModifierClicked(Surge::GUI::IComponentTagValue *c
.keytrack_root.val.i;
p->set_value_f01(p->value_to_normalized(kr - 69));
control->setValue(p->get_value_f01());
auto mci = dynamic_cast<Surge::Widgets::ModulatableControlInterface *>(
control);
if (mci)
{
mci->setQuantitizedDisplayValue(p->get_value_f01());
}
control->asJuceComponent()->repaint();
});
break;
default:
Expand Down

0 comments on commit e703371

Please sign in to comment.