diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-02-27 23:10:24 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-02-28 07:24:09 -0800 |
commit | f6957c54afaa58eab0b57127ac1f31389dfd35e1 (patch) | |
tree | 658de4e28e4e0de3dde4f83c6159828f7de1bad3 /desktop-widgets | |
parent | 2d2603c0bc3f0ae56d121d326b3ace8db2283130 (diff) | |
download | subsurface-f6957c54afaa58eab0b57127ac1f31389dfd35e1.tar.gz |
Autogroup: make notrip flag work again.
6bf4120dbbf7be1b9267e0e86f3948b77870ea71 replaced the trip flag by
a notrip boolean. This was supposed to signal that the user removed
the dive from a trip and therefore it shouldn't be autogrouped again.
Sadly, the commit removed the feature. Reinstate it.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/command_divelist.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/desktop-widgets/command_divelist.cpp b/desktop-widgets/command_divelist.cpp index f45202aa9..845afac75 100644 --- a/desktop-widgets/command_divelist.cpp +++ b/desktop-widgets/command_divelist.cpp @@ -754,8 +754,12 @@ RemoveDivesFromTrip::RemoveDivesFromTrip(const QVector<dive *> &divesToRemove) { setText(tr("remove %n dive(s) from trip", "", divesToRemove.size())); divesToMove.divesToMove.reserve(divesToRemove.size()); - for (dive *d: divesToRemove) + for (dive *d: divesToRemove) { + // If a user manually removes a dive from a trip, don't autogroup this dive. + // The flag will not be reset on undo, but that should be acceptable. + d->notrip = true; divesToMove.divesToMove.push_back( {d, nullptr} ); + } } RemoveAutogenTrips::RemoveAutogenTrips() |