Commit ee3d631c authored by T.J. Corona's avatar T.J. Corona Committed by Kitware Robot

Merge topic 'force-combobox-update-release' into release

e20dab61 qtCheckItemComboBox: force update when internal model has changed.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Alvaro Sanchez's avatarAlvaro Sanchez <alvaro.sanchez@kitware.com>
Merge-request: !880
parents a96f6cf5 e20dab61
......@@ -215,6 +215,13 @@ void qtModelEntityItemCombo::init()
}
}
itemModel->sort(0);
// the internal item model for our combo box has changed. For some reason,
// the appropriate signals do not fire to trigger the view to update unless
// we remove and add the item model to the view.
this->view()->setModel(nullptr);
this->view()->setModel(itemModel);
this->view()->viewport()->update();
}
connect(this->model(), SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this,
SLOT(itemCheckChanged(const QModelIndex&, const QModelIndex&)));
......
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