From 01234649121579a99af52ee72db577ac89543055 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Wed, 3 Aug 2016 13:19:12 +0200 Subject: [PATCH] Copy salinity and ambient pressure from diveplan to dive ... otherwise it does not get saved. Fixes #967 Signed-off-by: Robert C. Helling --- core/planner.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/planner.c b/core/planner.c index 8a2e1d6..601aac7 100644 --- a/core/planner.c +++ b/core/planner.c @@ -271,6 +271,8 @@ static void create_dive_from_plan(struct diveplan *diveplan, bool track_gas) reset_cylinders(&displayed_dive, track_gas); dc = &displayed_dive.dc; dc->when = displayed_dive.when = diveplan->when; + dc->surface_pressure.mbar = diveplan->surface_pressure; + dc->salinity = diveplan->salinity; free(dc->sample); dc->sample = NULL; dc->samples = 0; -- 2.7.4 (Apple Git-66)