summaryrefslogtreecommitdiffstats
path: root/qt-models/diveplannermodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r--qt-models/diveplannermodel.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index 0fd7962f3..d94b728ae 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -58,13 +58,14 @@ void DivePlannerPointsModel::createSimpleDive()
setupStartTime();
// initialize the start time in the plan
- diveplan.when = displayed_dive.when;
+ diveplan.when = dateTimeToTimestamp(startTime);
+ displayed_dive.when = diveplan.when;
// Use gas from the first cylinder
int cylinderid = 0;
// If we're in drop_stone_mode, don't add a first point.
- // It will be added implicit.
+ // It will be added implicitly.
if (!prefs.drop_stone_mode)
addStop(M_OR_FT(15, 45), 1 * 60, cylinderid, 0, true, UNDEF_COMP_TYPE);
@@ -91,7 +92,6 @@ void DivePlannerPointsModel::setupStartTime()
startTime = startTime.addSecs(diff + 3600);
}
}
- emit startTimeChanged(startTime);
}
void DivePlannerPointsModel::loadFromDive(dive *d)
@@ -737,7 +737,6 @@ void DivePlannerPointsModel::setStartTime(const QTime &t)
emitDataChanged();
}
-
bool divePointsLessThan(const divedatapoint &p1, const divedatapoint &p2)
{
return p1.time < p2.time;