Planner: record the new dive at the correct time

We don't want to do this when calling plan() from createTemporaryPlan() -
we only want to record the dive at the end of createPlan().

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-05-28 22:16:15 -07:00
parent 03eba8f99d
commit b37422c447
2 changed files with 1 additions and 2 deletions

View file

@ -769,8 +769,6 @@ void plan(struct diveplan *diveplan, char **cached_datap, struct dive **divep, b
*divep = dive = create_dive_from_plan(diveplan);
if (!dive)
goto error_exit;
record_dive(dive);
add_plan_to_notes(diveplan, dive);
error_exit:

View file

@ -871,6 +871,7 @@ void DivePlannerPointsModel::createPlan()
cyl->end.mbar = 0;
}
}
record_dive(tempDive);
mark_divelist_changed(true);
// Remove and clean the diveplan, so we don't delete