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>
This commit is contained in:
Robert C. Helling 2016-08-03 13:19:12 +02:00 committed by Dirk Hohndel
parent c5ca5c639f
commit c23e3adc29

View file

@ -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;