commit 32f9d002ed5754832291b9dce0123eac684588a6
parent 3c180e9b648993562ba530ee5fd7d2a13168f1b0
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Wed, 16 Mar 2022 21:58:55 +0100
do not notify host about combo box changes if the paramter is not public
Diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/source/jucePlugin/VirusParameterBinding.cpp b/source/jucePlugin/VirusParameterBinding.cpp
@@ -114,9 +114,12 @@ void VirusParameterBinding::bind(juce::ComboBox& _combo, const Virus::ParameterT
//_combo.addItemList(v->getAllValueStrings(), 1);
_combo.setSelectedId(static_cast<int>(v->getValueObject().getValueSource().getValue()) + 1, juce::dontSendNotification);
_combo.onChange = [this, &_combo, v]() {
- v->beginChangeGesture();
- v->setValueNotifyingHost(v->convertTo0to1(static_cast<float>(_combo.getSelectedId() - 1)));
- v->endChangeGesture();
+ if(v->getDescription().isPublic)
+ {
+ v->beginChangeGesture();
+ v->setValueNotifyingHost(v->convertTo0to1(static_cast<float>(_combo.getSelectedId() - 1)));
+ v->endChangeGesture();
+ }
v->getValueObject().getValueSource().setValue((int)_combo.getSelectedId() - 1);
};
v->onValueChanged = [this, &_combo, v]() { _combo.setSelectedId(static_cast<int>(v->getValueObject().getValueSource().getValue()) + 1, juce::dontSendNotification); };