diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-02-23 20:29:18 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-04-02 13:53:23 -0700 |
commit | 4009d4c87f3a12a052f14b8a024e5b9f58140d25 (patch) | |
tree | 74d8a53103ee2df4443de140defeb214754605aa /qt-models/diveplannermodel.h | |
parent | 457be51ff66fb7c3396863a27f4d93de1877e3b2 (diff) | |
download | subsurface-4009d4c87f3a12a052f14b8a024e5b9f58140d25.tar.gz |
planner: remove DivePlannerPointsModel::setRecalc()
The only external user of setRecalc() was turning recalculation
on. In fact, this happened when constructing the planner-widget.
However, for example editing of the profile only works when
the recalc flag is on.
This is all very confusing, let's just turn the flag on by
default and remove the accessor. Internally, the planner can
simply use the std::exchange function to set and reset the
recalc flag.
Perhaps the setting/resetting can be replaced by simple
recalc = true;
...
recalc = false;
pairs. It is unclear whether there is need for recursion.
Something to be investigated.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/diveplannermodel.h')
-rw-r--r-- | qt-models/diveplannermodel.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/qt-models/diveplannermodel.h b/qt-models/diveplannermodel.h index 5a5fc0155..9b79232d6 100644 --- a/qt-models/diveplannermodel.h +++ b/qt-models/diveplannermodel.h @@ -41,7 +41,6 @@ public: bool isPlanner() const; void createSimpleDive(struct dive *d); Mode currentMode() const; - bool setRecalc(bool recalc); bool recalcQ() const; bool tankInUse(int cylinderid) const; CylindersModel *cylindersModel(); |