Commit 33df2919 authored by CABEL Tristan's avatar CABEL Tristan

stringlistCOmbobox update values when parameter values change

parent 6d5da23f
......@@ -68,6 +68,11 @@ bool dtkWidgetsParameterStringListComboBox::connect(dtkCoreParameter *p)
}
m_parameter->connect([=] (QVariant v) {
if(d->combo_box->count() != m_parameter->values().count()) {
d->combo_box->clear();
d->combo_box->addItems(m_parameter->values());
}
QString value = v.value<dtk::d_inliststring>().value();
int index = d->combo_box->findText(value);
if ( index != -1 ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment