diff options
author | Stefan Fuchs <sfuchs@gmx.de> | 2017-11-27 12:37:25 +0100 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2017-11-27 22:40:16 +0100 |
commit | 276fd441b5012864845ee86720bd7d42ff1fcfdf (patch) | |
tree | 035b611b71ea3bf72a2521c880132b86ec92ad15 | |
parent | 8a92484b0cc1cd2e2f0e026ef1982a56feccd26f (diff) | |
download | subsurface-276fd441b5012864845ee86720bd7d42ff1fcfdf.tar.gz |
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 <sfuchs@gmx.de>
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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() |