From 0f37f74dda233f10b7c1b249698eabd2f49d1087 Mon Sep 17 00:00:00 2001 From: eelke Date: Sun, 10 Feb 2019 09:10:31 +0100 Subject: [PATCH] Fix: parameter type combobox didn't come up with old value. Was looking in wrong column of model for the value to show. --- pglab/ParamTypeDelegate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pglab/ParamTypeDelegate.cpp b/pglab/ParamTypeDelegate.cpp index b31a47f..7c1fda0 100644 --- a/pglab/ParamTypeDelegate.cpp +++ b/pglab/ParamTypeDelegate.cpp @@ -35,7 +35,7 @@ void ParamTypeDelegate::setEditorData(QWidget *editor, const QModelIndex &index) auto data = index.data(); if (data.canConvert()) { 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()); }