summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-06-24 12:04:50 +0800
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2019-06-24 10:32:41 +0200
commitca496c63aed2ff8c372baefee6a8b7a48402d081 (patch)
treec748f70359c8888e9cccab1a7665f6bed7b136e5
parent2e230da3610dd1fc61badaf328a084512895fb90 (diff)
downloadsubsurface-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>
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp2
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);
}
}