summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--planner.c1
-rw-r--r--qt-ui/diveplanner.cpp4
2 files changed, 1 insertions, 4 deletions
diff --git a/planner.c b/planner.c
index 3cad8d132..51754de06 100644
--- a/planner.c
+++ b/planner.c
@@ -262,6 +262,7 @@ static void create_dive_from_plan(struct diveplan *diveplan, bool track_gas)
// displayed dive so we can restart
reset_cylinders(&displayed_dive, track_gas);
dc = &displayed_dive.dc;
+ dc->when = displayed_dive.when = diveplan->when;
free(dc->sample);
dc->sample = NULL;
dc->samples = 0;
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 4f3655b12..d1d4abdd0 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -69,9 +69,6 @@ void DivePlannerPointsModel::createSimpleDive()
{
struct gasmix gas = { 0 };
- // set the start time of the plan
- diveplan.when = displayed_dive.when;
-
if (isPlanner())
// let's use the gas from the first cylinder
gas = displayed_dive.cylinder[0].gasmix;
@@ -666,7 +663,6 @@ int DivePlannerPointsModel::rowCount(const QModelIndex &parent) const
DivePlannerPointsModel::DivePlannerPointsModel(QObject *parent) : QAbstractTableModel(parent), mode(NOTHING)
{
memset(&diveplan, 0, sizeof(diveplan));
- startTime = QDateTime::currentDateTimeUtc();
}
DivePlannerPointsModel *DivePlannerPointsModel::instance()