Skip to content

Commit

Permalink
Fixing custom choice parameter save/load bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Mar 13, 2024
1 parent 1b173e2 commit 8d6973b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/processors/other/Delay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,11 @@ bool DelayModule::getCustomComponents (OwnedArray<Component>& customComps, chowd
addChildComponent (tempoSyncSelector);
addChildComponent (delayTimeSlider);

const auto* modeChoiceParam = getParameterPointer<chowdsp::RhythmParameter*> (vts, DelayTags::tempoSyncAmountTag);
tempoSyncSelector.addItemList (modeChoiceParam->choices, 1);
tempoSyncSelector.setSelectedItemIndex (0);
const auto* tempoChoiceParam = getParameterPointer<chowdsp::RhythmParameter*> (vts, DelayTags::tempoSyncAmountTag);
tempoSyncSelector.addItemList (tempoChoiceParam->choices, 1);
tempoSyncSelector.setSelectedItemIndex (tempoChoiceParam->getIndex());
tempoSyncSelector.setScrollWheelEnabled (true);
hcp.registerParameterComponent (tempoSyncSelector, *modeChoiceParam);
hcp.registerParameterComponent (tempoSyncSelector, *tempoChoiceParam);

hcp.registerParameterComponent (delayTimeSlider, delayTimeSlider.getParameter());

Expand Down
2 changes: 1 addition & 1 deletion src/processors/tone/StateVariableFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ bool StateVariableFilter::getCustomComponents (OwnedArray<Component>& customComp

const auto* modeChoiceParam = getParameterPointer<AudioParameterChoice*> (vts, SVFTags::modeTag);
modeSelector.addItemList (modeChoiceParam->choices, 1);
modeSelector.setSelectedItemIndex (0);
modeSelector.setSelectedItemIndex (modeChoiceParam->getIndex());
modeSelector.setScrollWheelEnabled (true);
hcp.registerParameterComponent (modeSelector, *modeChoiceParam);

Expand Down

0 comments on commit 8d6973b

Please sign in to comment.