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:
parent
f2808de613
commit
0f37f74dda
1 changed files with 1 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ void ParamTypeDelegate::setEditorData(QWidget *editor, const QModelIndex &index)
|
||||||
auto data = index.data();
|
auto data = index.data();
|
||||||
if (data.canConvert<QString>()) {
|
if (data.canConvert<QString>()) {
|
||||||
QModelIndexList indexes = m_typeSelectionModel->match(
|
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()) {
|
if (!indexes.empty()) {
|
||||||
cmbbx->setCurrentIndex(indexes.at(0).row());
|
cmbbx->setCurrentIndex(indexes.at(0).row());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue