Autogroup: make notrip flag work again.

6bf4120dbb 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>
This commit is contained in:
Berthold Stoeger 2019-02-27 23:10:24 +01:00 committed by Dirk Hohndel
parent 2d2603c0bc
commit f6957c54af

View file

@ -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()