summaryrefslogtreecommitdiffstats
path: root/core/planner.c
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2016-08-03 13:19:12 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-08-10 15:06:48 -0700
commitc23e3adc2939aeb8dc2099146ab6513fa9e6d3f5 (patch)
tree83da9a9ff74f85fcf3fca3f731a15ad3421cd958 /core/planner.c
parentc5ca5c639f18b2b0625f55f5a904a39d7cf3d1fc (diff)
downloadsubsurface-c23e3adc2939aeb8dc2099146ab6513fa9e6d3f5.tar.gz
Copy salinity and ambient pressure from diveplan to dive
... otherwise it does not get saved. Fixes #967 Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/planner.c')
-rw-r--r--core/planner.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/planner.c b/core/planner.c
index 8a2e1d649..601aac767 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;