diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-02-27 22:27:47 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-04-02 13:53:23 -0700 |
commit | c7dcd7fbf0173fb665e5b9c348e0ead7f969e827 (patch) | |
tree | 0ba42fe70dad3c7f4044bcf53b4dd36800a31f8d /qt-models | |
parent | 601861ef5e05b88b9721cde5b49d16b5b00caa50 (diff) | |
download | subsurface-c7dcd7fbf0173fb665e5b9c348e0ead7f969e827.tar.gz |
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>
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/diveplannermodel.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 7019472c7..082b5d5d4 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -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() |