Core: replace tripflag by notrip boolean

The only remaining use of the tripflag was to mark dives that
were removed explicitly from a trip, i.e. shouldn't be autogrouped.
Therefore replace the enum by a simple boolean.

Currently, there is no way of unsetting the notrip flag. But this
shouldn't result in a user-visible change.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-11-18 11:15:32 +01:00 committed by Dirk Hohndel
parent 3b9e0b5931
commit 6bf4120dbb
9 changed files with 13 additions and 28 deletions

View file

@ -1273,10 +1273,8 @@ bool QMLManager::undoDelete(int id)
insert_trip(deletedTrip);
if (deletedDive->divetrip) {
struct dive_trip *trip = deletedDive->divetrip;
tripflag_t tripflag = deletedDive->tripflag; // this gets overwritten in add_dive_to_trip()
deletedDive->divetrip = NULL;
add_dive_to_trip(deletedDive, trip);
deletedDive->tripflag = tripflag;
}
record_dive(deletedDive);
QList<dive *>diveAsList;