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>
This commit is contained in:
Dirk Hohndel 2019-06-24 12:04:50 +08:00 committed by bstoeger
parent 2e230da361
commit ca496c63ae

View file

@ -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);
}
}