mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Undo/redo of dive deletion needs to handle trips as well
If we delete dives that were part of a trip, that trip may get deleted as well. So if we undo that operation we need to bring back the trip, too. This also deals with a bug in the original code that did the delete both in calling code (in divelistview.cpp) and in the redo function. Because of the nature of the delete this didn't really matter but it is of course wrong and with the new code it would in fact cause an issue. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7c427dcc02
commit
a94c84d598
3 changed files with 41 additions and 13 deletions
|
@ -13,6 +13,7 @@ public:
|
|||
|
||||
private:
|
||||
QList<struct dive*> diveList;
|
||||
QList<struct dive_trip*> tripList;
|
||||
};
|
||||
|
||||
class UndoShiftTime : public QUndoCommand {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue