Fix: parameter type combobox didn't come up with old value.

Was looking in wrong column of model for the value to show.
This commit is contained in:
eelke 2019-02-10 09:10:31 +01:00
parent f2808de613
commit 0f37f74dda

View file

@ -35,7 +35,7 @@ void ParamTypeDelegate::setEditorData(QWidget *editor, const QModelIndex &index)
auto data = index.data();
if (data.canConvert<QString>()) {
QModelIndexList indexes = m_typeSelectionModel->match(
m_typeSelectionModel->index(0, 1), Qt::DisplayRole, data, 1, Qt::MatchFlags( Qt::MatchExactly ));
m_typeSelectionModel->index(0, 0), Qt::DisplayRole, data, 1, Qt::MatchFlags( Qt::MatchExactly ));
if (!indexes.empty()) {
cmbbx->setCurrentIndex(indexes.at(0).row());
}