mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
c463087ab0
commit
76f3c0f028
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue