summaryrefslogtreecommitdiffstats
path: root/qt-ui/modeldelegates.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-11-14 17:39:35 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-15 09:19:14 +0900
commit96d5687ab89edd7163493faf212ddcb119e93d8c (patch)
tree6d3d148d776a134172d612fa13fe00223aaecdbc /qt-ui/modeldelegates.cpp
parentb77d990ed6892081f7c1e0df62631b57aad3b59f (diff)
downloadsubsurface-96d5687ab89edd7163493faf212ddcb119e93d8c.tar.gz
Correctly handle changes on the CylinderModel to update the AirModel.
What happened before was that the AirTypes model was only being updated when the user requested to change the air by clicking directly on the Air, in the planner ( but not on the Air Table. ). This fixes it by calling 'repopulate' whenever the cylinder model changes ( by adding, removing and changing something.) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/modeldelegates.cpp')
-rw-r--r--qt-ui/modeldelegates.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp
index e7399117c..cb1af8706 100644
--- a/qt-ui/modeldelegates.cpp
+++ b/qt-ui/modeldelegates.cpp
@@ -307,7 +307,7 @@ void AirTypesDelegate::setModelData(QWidget* editor, QAbstractItemModel* model,
model->setData(index, QVariant(combo->currentText()));
}
-AirTypesDelegate::AirTypesDelegate(QObject* parent) : ComboBoxDelegate(gasSelectionModel(), parent)
+AirTypesDelegate::AirTypesDelegate(QObject* parent) : ComboBoxDelegate(GasSelectionModel::instance(), parent)
{
}