summaryrefslogtreecommitdiffstats
path: root/qt-models/diveplannermodel.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-25 21:45:29 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-04-02 13:53:23 -0700
commite419ebf55a28d2483951e52ca274aedd96f11789 (patch)
tree32d5168bdaa00cde2216842f62c005fa21779db5 /qt-models/diveplannermodel.h
parent02ef58a48bfa9042e034e83cb128ae6b7f83628e (diff)
downloadsubsurface-e419ebf55a28d2483951e52ca274aedd96f11789.tar.gz
planner: move clearing of model into loadFromDive() function
Both loadFromDive() callers were clearing the model before calling loadFromDive(). Move the clearing into that function since it makes no sense to load into a non-cleared model. Apparently this changes the way that no-cylinder dives are treated and the code in ProfileWidget2::repositionDiveHandlers() must now explicitly check for that condition. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/diveplannermodel.h')
-rw-r--r--qt-models/diveplannermodel.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/diveplannermodel.h b/qt-models/diveplannermodel.h
index 52c01dd36..8cc12c5c8 100644
--- a/qt-models/diveplannermodel.h
+++ b/qt-models/diveplannermodel.h
@@ -40,7 +40,6 @@ public:
void setPlanMode(Mode mode);
bool isPlanner() const;
void createSimpleDive();
- void clear();
Mode currentMode() const;
bool setRecalc(bool recalc);
bool recalcQ() const;
@@ -119,6 +118,7 @@ signals:
private:
explicit DivePlannerPointsModel(QObject *parent = 0);
+ void clear();
void setupStartTime();
void setupCylinders();
int lastEnteredPoint() const;