summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/command_divelist.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-07-30 15:55:29 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-11 16:22:27 -0700
commit96d87273995a6af35d90efb1190ff653e4c03d02 (patch)
treef115a9ccd821cab753f2863fa86f9f08cd20bbd4 /desktop-widgets/command_divelist.h
parent26901a8dbd91a18689199361541f9d1f90d56e4e (diff)
downloadsubsurface-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.h6
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