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>
This commit is contained in:
Stefan Fuchs 2017-11-27 12:37:25 +01:00 committed by Lubomir I. Ivanov
parent 8a92484b0c
commit 276fd441b5

View file

@ -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()