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:
parent
601861ef5e
commit
c7dcd7fbf0
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user