Retain the start time when creating plan from dive

We need to make sure that the start time is set before we start adding
points.

Fixes #661

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-07-29 12:50:50 -07:00
parent d262886a2d
commit 936f057ddc

View file

@ -109,6 +109,7 @@ void DivePlannerPointsModel::loadFromDive(dive *d)
CylindersModel::instance()->updateDive();
duration_t lasttime = {};
struct gasmix gas;
diveplan.when = d->when;
for (int i = 0; i < d->dc.samples - 1; i++) {
const sample &s = d->dc.sample[i];
if (s.time.seconds == 0)