mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
acd3599548
commit
a8888eaf26
6 changed files with 154 additions and 22 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue