commit 44d51e47c38d14a4b028749ca4ff79315214f482 parent 1efb35470df9161ba52605eef6ef8c46a7651336 Author: dsp56300 <dsp56300@users.noreply.github.com> Date: Tue, 18 Jan 2022 21:46:55 +0100 fix broken combo box selection Diffstat:
M | source/jucePlugin/VirusParameterBinding.cpp | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/jucePlugin/VirusParameterBinding.cpp b/source/jucePlugin/VirusParameterBinding.cpp @@ -65,7 +65,7 @@ void VirusParameterBinding::bind(juce::ComboBox& _combo, Virus::ParameterType _p _combo.setSelectedId((int)v->getValueObject().getValueSource().getValue() + 1, juce::dontSendNotification); _combo.onChange = [this, &_combo, v]() { v->beginChangeGesture(); - v->setValueNotifyingHost(v->convertTo0to1(v->getValueForText(_combo.getText()))); //.getSelectedId() - 1); + v->setValueNotifyingHost(v->convertTo0to1(_combo.getSelectedId()-1)); v->endChangeGesture(); v->getValueObject().getValueSource().setValue((int)_combo.getSelectedId() - 1); };