Skip to content

Commit

Permalink
Lv2Proc: Set def val for ComboModel, too
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesLorenz committed Sep 24, 2023
1 parent 94608ea commit 83777dc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/core/lv2/Lv2Proc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,8 +593,16 @@ void Lv2Proc::createPort(std::size_t portNum)
comboModel->addItem(s);
}
}
for(std::size_t i = 0; i < ctrl->m_scalePointMap.size(); ++i)
{
if(meta.def() == ctrl->m_scalePointMap[i])
{
comboModel->setValue(i);
comboModel->setInitValue(i);
break;
}
}
ctrl->m_connectedModel.reset(comboModel);
// TODO: use default value on comboModel, too?
break;
}
case Lv2Ports::Vis::Toggled:
Expand Down

0 comments on commit 83777dc

Please sign in to comment.