Undo: use dive * instead of unique index in renumber-dives

Now, that pointers to dives are stable, we might just as well
use dive * instead of the unique-id. This also affects the
merge-dive command, as this uses the same renumbering machinery.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-07-30 15:55:29 +02:00 committed by Dirk Hohndel
parent 26901a8dbd
commit 96d8727399
5 changed files with 16 additions and 16 deletions

View file

@ -18,7 +18,7 @@ QAction *redoAction(QObject *parent); // Create an redo action.
void addDive(dive *d, bool autogroup);
void deleteDive(const QVector<struct dive*> &divesToDelete);
void shiftTime(const QVector<dive *> &changedDives, int amount);
void renumberDives(const QVector<QPair<int, int>> &divesToRenumber);
void renumberDives(const QVector<QPair<dive *, int>> &divesToRenumber);
void removeDivesFromTrip(const QVector<dive *> &divesToRemove);
void removeAutogenTrips();
void addDivesToTrip(const QVector<dive *> &divesToAddIn, dive_trip *trip);