Dive list: seriously simplify the "add to trip" code

The existing code seemed way complicated, made way too many assumptions
and apparently was broken in certain cases.

This code seems very simple, looks correct and should fail gracefully
(i.e. simply do nothing) if things get confused.

Fixes #706

(I hope)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-08-21 14:20:03 -05:00
parent b940f078b5
commit 512c42e38a
2 changed files with 15 additions and 27 deletions

View file

@ -79,7 +79,7 @@ private:
void updateLastUsedImageDir(const QString &s);
void updateLastImageTimeOffset(int offset);
int lastImageTimeOffset();
void addToTrip(bool);
void addToTrip(int delta);
};
#endif // DIVELISTVIEW_H