From 8834fc0443aadfe4e98a2b8db3253a9bf61645f8 Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Mon, 13 Mar 2017 08:25:32 +0100 Subject: Correctly trigger update of cylinder table trash icons in planner Signed-off-by: Stefan Fuchs --- qt-models/diveplannermodel.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-models/diveplannermodel.cpp') diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index f4b821e6e..26e4fc1ba 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -24,6 +24,7 @@ void DivePlannerPointsModel::removeSelectedPoints(const QVector &rows) divepoints.remove(v2[i]); } endRemoveRows(); + CylindersModel::instance()->updateTrashIcon(); } void DivePlannerPointsModel::createSimpleDive() @@ -314,6 +315,7 @@ bool DivePlannerPointsModel::setData(const QModelIndex &index, const QVariant &v case GAS: if (value.toInt() >= 0 && value.toInt() < MAX_CYLINDERS) p.cylinderid = value.toInt(); + CylindersModel::instance()->updateTrashIcon(); break; } editStop(index.row(), p); @@ -732,6 +734,7 @@ void DivePlannerPointsModel::remove(const QModelIndex &index) divepoints.remove(index.row()); } endRemoveRows(); + CylindersModel::instance()->updateTrashIcon(); } struct diveplan &DivePlannerPointsModel::getDiveplan() -- cgit v1.2.3-70-g09d2