diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2019-06-24 12:04:50 +0800 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2019-06-24 10:32:41 +0200 |
commit | ca496c63aed2ff8c372baefee6a8b7a48402d081 (patch) | |
tree | c748f70359c8888e9cccab1a7665f6bed7b136e5 /desktop-widgets | |
parent | 2e230da3610dd1fc61badaf328a084512895fb90 (diff) | |
download | subsurface-ca496c63aed2ff8c372baefee6a8b7a48402d081.tar.gz |
Desktop: fix time editing
We were shifting in the wrong direction. Which caused the field to be marked as
'edited' again, which meant we shifted the wrong way and twice the distance.
This seems to fix the problem for both date and time editing.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index ee246e3ab..7e8279a0b 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -814,7 +814,7 @@ static void shiftTime(QDateTime &dateTime) timestamp_t when = dateTime.toTime_t(); if (current_dive && current_dive->when != when) { - timestamp_t offset = current_dive->when - when; + timestamp_t offset = when - current_dive->when; Command::shiftTime(dives, (int)offset); } } |