summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-20 16:41:42 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-21 08:30:32 -0700
commita8888eaf26c9355f3f2d20c24526489e17d3404a (patch)
treeb45150112874e018d80dba76cac913faec22393d /qt-ui/diveplanner.cpp
parentacd35995484ba8b0a4ee416b5dcceb76b843439e (diff)
downloadsubsurface-a8888eaf26c9355f3f2d20c24526489e17d3404a.tar.gz
Allow editing of date & time and air & water temperatures
Add two more rows to the widget - this is getting quite busy. There still is some weirdness where the focus isn't returned where it should be and a few other details, but overall getting there. Added helper functions to parse a temperature and to deal with the timezone offset - with that latter one I also fixed the time offset bug in the planner. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 87edbbc8a..c5649e19e 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -11,6 +11,7 @@
#include "../dive.h"
#include "../divelist.h"
#include "../planner.h"
+#include "helpers.h"
#include <QMouseEvent>
#include <QDebug>
@@ -1056,7 +1057,7 @@ void DivePlannerPointsModel::setLastStop6m(bool value)
void DivePlannerPointsModel::setStartTime(const QTime& t)
{
- diveplan.when = (t.msec() + QDateTime::currentMSecsSinceEpoch()) / 1000 - Qt::OffsetFromUTC * 3600;
+ diveplan.when = (t.msec() + QDateTime::currentMSecsSinceEpoch()) / 1000 - gettimezoneoffset();
emit dataChanged(createIndex(0, 0), createIndex(rowCount()-1, COLUMNS-1));
}