planner: don't clear recalc in DivePlannerPointsModel::clear()

There are no more external users of this flag, therefore clearing
that flag is a no-op.

Moreover, clear the cylinders array and the preserved_until
flag befor emitting the model-reset signal.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-02-27 22:27:47 +01:00 committed by Dirk Hohndel
parent 601861ef5e
commit c7dcd7fbf0

View file

@ -995,14 +995,11 @@ bool DivePlannerPointsModel::tankInUse(int cylinderid) const
void DivePlannerPointsModel::clear()
{
bool oldrec = std::exchange(recalc, false);
cylinders.clear();
preserved_until.seconds = 0;
beginResetModel();
divepoints.clear();
endResetModel();
cylinders.clear();
preserved_until.seconds = 0;
recalc = oldrec;
}
void DivePlannerPointsModel::createTemporaryPlan()