diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-07-30 15:55:29 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-11 16:22:27 -0700 |
commit | 96d87273995a6af35d90efb1190ff653e4c03d02 (patch) | |
tree | f115a9ccd821cab753f2863fa86f9f08cd20bbd4 /desktop-widgets/command_divelist.h | |
parent | 26901a8dbd91a18689199361541f9d1f90d56e4e (diff) | |
download | subsurface-96d87273995a6af35d90efb1190ff653e4c03d02.tar.gz |
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>
Diffstat (limited to 'desktop-widgets/command_divelist.h')
-rw-r--r-- | desktop-widgets/command_divelist.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop-widgets/command_divelist.h b/desktop-widgets/command_divelist.h index 69824ce9f..e679369af 100644 --- a/desktop-widgets/command_divelist.h +++ b/desktop-widgets/command_divelist.h @@ -85,14 +85,14 @@ private: class RenumberDives : public Base { public: - RenumberDives(const QVector<QPair<int, int>> &divesToRenumber); + RenumberDives(const QVector<QPair<dive *, int>> &divesToRenumber); private: void undo() override; void redo() override; bool workToBeDone() override; // For redo and undo: pairs of dive-id / new number - QVector<QPair<int, int>> divesToRenumber; + QVector<QPair<dive *, int>> divesToRenumber; }; // The classes RemoveDivesFromTrip, RemoveAutogenTrips, CreateTrip, AutogroupDives @@ -166,7 +166,7 @@ private: std::vector<DiveToAdd> unmergedDives; // For undo and redo - QVector<QPair<int, int>> divesToRenumber; + QVector<QPair<dive *, int>> divesToRenumber; }; } // namespace Command |