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:
parent
03eba8f99d
commit
b37422c447
@ -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:
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user