planner: initialize dive selection mode in constructor

There is no point in repopulating this regularly, as the
content does not change.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-11-08 07:48:49 +01:00 committed by bstoeger
parent 4c02d1c279
commit 1fb9d6236b
3 changed files with 5 additions and 13 deletions

View file

@ -582,7 +582,6 @@ void PlannerWidgets::planDive()
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN);
repopulateGasModel();
diveTypeModel->repopulate(); // TODO: this doesn't change anything!?
plannerWidget.setReplanButton(false);
plannerWidget.setupStartTime(timestampToDateTime(planned_dive->when)); // This will reload the profile!
}
@ -597,7 +596,6 @@ void PlannerWidgets::replanDive(int currentDC)
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN);
DivePlannerPointsModel::instance()->loadFromDive(planned_dive.get(), currentDC);
diveTypeModel->repopulate(); // TODO: this doesn't change anything!?
plannerWidget.setReplanButton(true);
plannerWidget.setupStartTime(timestampToDateTime(planned_dive->when));
if (planned_dive->surface_pressure.mbar)