juce-framework / JUCE

JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, LV2 and AAX audio plug-ins.
https://juce.com
Other
6.63k stars 1.74k forks source link

JUCE 6 combobox attachment problem #739

Closed jerryuhoo closed 4 years ago

jerryuhoo commented 4 years ago

I wrote that code using combobox attachment

distortionMode.addItem("Arctan Soft Clipping", 1);
distortionMode.addItem("Exp Soft Clipping", 2);
distortionMode.addItem("Tanh Soft Clipping", 3);
modeAttachment = std::make_unique<AudioProcessorValueTreeState::ComboBoxAttachment>(processor.treeState, "mode", distortionMode);

When I chose the first item and the second item, the parameter in processor.treeState returned 1. When I chose the 3rd, 4th ... the parameter returned 2, 3, ... But when I switched to JUCE 5.4.7 develop branch, everything was normal. So I think that's a JUCE 6 bug.

System: MacOS Catalina 10.15.5 Xcode 11.5 64-bit audio plugin

ed95 commented 4 years ago

Fixed in https://github.com/juce-framework/JUCE/commit/86aa02413849cab4642791af52d5b370fb507a80.