diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-08-19 14:59:15 -0500 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-08-19 15:06:48 -0500 |
commit | 76f3c0f028b2eb83fb8cc01cd60488f79752b799 (patch) | |
tree | cb7de6c853fb238b627bf622f043cc1ee6b0b72b /qt-ui/diveplanner.cpp | |
parent | c463087ab0e74154cc95183031dde4f762a5d7d0 (diff) | |
download | subsurface-76f3c0f028b2eb83fb8cc01cd60488f79752b799.tar.gz |
Planner: don't calculate ascent while adding waypoints
It's silly to carefully calculate our ascent for each new waypoint that we
add to the plan. Let's get them all in and THEN calculate an ascent.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r-- | qt-ui/diveplanner.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 999850183..b5fee2970 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -106,6 +106,8 @@ void DivePlannerPointsModel::setupStartTime() void DivePlannerPointsModel::loadFromDive(dive *d) { + bool oldRec = recalc; + recalc = false; CylindersModel::instance()->updateDive(); duration_t lasttime = {}; struct gasmix gas; @@ -118,6 +120,8 @@ void DivePlannerPointsModel::loadFromDive(dive *d) plannerModel->addStop(s.depth.mm, s.time.seconds, &gas, 0, true); lasttime = s.time; } + recalc = oldRec; + emitDataChanged(); } // copy the tanks from the current dive, or the default cylinder |