diff options
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r-- | qt-models/diveplannermodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index ca84fd597..4c60e6736 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -58,7 +58,7 @@ void DivePlannerPointsModel::setupStartTime() startTime = QDateTime::currentDateTimeUtc().addSecs(3600 + gettimezoneoffset()); if (dive_table.nr) { struct dive *d = get_dive(dive_table.nr - 1); - time_t ends = d->when + d->duration.seconds; + time_t ends = dive_endtime(d); time_t diff = ends - startTime.toTime_t(); if (diff > 0) { startTime = startTime.addSecs(diff + 3600); |