From 276fd441b5012864845ee86720bd7d42ff1fcfdf Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Mon, 27 Nov 2017 12:37:25 +0100 Subject: When replanning logged dive call CylindersModel->updateDive reset_cylinder may transform unused cylinders into zombie cylinders inside the planner because it adds a depth info and therefore the planner will use them. By calling CylindersModel->updateDive these cylinders will become visible and can be deleted by the user. Signed-off-by: Stefan Fuchs --- desktop-widgets/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'desktop-widgets') diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index f0133a0a0..71babd03a 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -36,6 +36,7 @@ #include "qt-models/weigthsysteminfomodel.h" #include "qt-models/yearlystatisticsmodel.h" #include "qt-models/diveplannermodel.h" +#include "qt-models/cylindermodel.h" #include "desktop-widgets/divelogimportdialog.h" #include "desktop-widgets/divelogexportdialog.h" #include "desktop-widgets/usersurvey.h" @@ -980,6 +981,7 @@ void MainWindow::on_actionReplanDive_triggered() divePlannerWidget()->setSalinity(current_dive->salinity); DivePlannerPointsModel::instance()->loadFromDive(current_dive); reset_cylinders(&displayed_dive, true); + CylindersModel::instance()->updateDive(); } void MainWindow::on_actionDivePlanner_triggered() -- cgit v1.2.3-70-g09d2