Dive pictures: update thumbnail positions on deletion

If pictures were deleted, the remaining thumbails where staying at
their positions. Only when switching between dives, the new positions
were recalculated. Do the recalculation immediately. More precisely:
the x-coordinate, which is determined by the timestamp, stays identical.
Only the y-coordinate is recalculated such that overlapping of thumbnails
is avoided.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Berthold Stoeger 2018-06-30 12:55:55 +02:00 committed by Dirk Hohndel
parent b2422f8856
commit 0aaa1bf386
2 changed files with 29 additions and 14 deletions

View file

@ -240,6 +240,7 @@ private:
bool operator< (const PictureEntry &e) const;
};
std::vector<PictureEntry> pictures;
void calculatePictureYPositions();
QList<DiveHandler *> handles;
void repositionDiveHandlers();