mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
2d2603c0bc
commit
f6957c54af
1 changed files with 5 additions and 1 deletions
|
@ -754,8 +754,12 @@ RemoveDivesFromTrip::RemoveDivesFromTrip(const QVector<dive *> &divesToRemove)
|
||||||
{
|
{
|
||||||
setText(tr("remove %n dive(s) from trip", "", divesToRemove.size()));
|
setText(tr("remove %n dive(s) from trip", "", divesToRemove.size()));
|
||||||
divesToMove.divesToMove.reserve(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} );
|
divesToMove.divesToMove.push_back( {d, nullptr} );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoveAutogenTrips::RemoveAutogenTrips()
|
RemoveAutogenTrips::RemoveAutogenTrips()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue