From 96d5687ab89edd7163493faf212ddcb119e93d8c Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 14 Nov 2013 17:39:35 -0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/modeldelegates.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui/modeldelegates.cpp') 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) { } -- cgit v1.2.3-70-g09d2