core: shift dive time in correct direction

Unsure where this bug got introduced, but when asking for the dive
time to be shifted 1 hour later, the divelist and the dive details
showed 1 our earlier.

Fixes: #1893

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2018-12-20 19:03:44 +01:00 committed by bstoeger
parent 9f417cacaa
commit 73213d3c79

View file

@ -600,7 +600,7 @@ ShiftTime::ShiftTime(const QVector<dive *> &changedDives, int amount)
void ShiftTime::redoit()
{
for (dive *d: diveList)
d->when -= timeChanged;
d->when += timeChanged;
// Changing times may have unsorted the dive table
sort_table(&dive_table);