diff options
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 31 |
1 files changed, 7 insertions, 24 deletions
@@ -378,6 +378,10 @@ static gboolean is_potentially_redundant(struct event *event) { if (!strcmp(event->name, "gaschange")) return FALSE; + if (!strcmp(event->name, "bookmark")) + return FALSE; + if (!strcmp(event->name, "heading")) + return FALSE; return TRUE; } @@ -811,30 +815,9 @@ static void pick_and_delete_trip(struct dive *res, struct dive *pick, struct div dive_trip_t *trip = pick->divetrip; res->tripflag = tripflag; - res->divetrip = trip; - - /* - * We may have to change the trip date if we picked an earlier - * date for the dive that now uses it. - */ - if (res->when < trip->when) - trip->when = res->when; - - /* Was it the same trip as the removed dive? All good*/ - if (trip == remove->divetrip) - return; - - /* Ok, we're dropping a dive. We may need to fix up the date on it */ - trip = remove->divetrip; - if (trip->when != remove->when) - return; - - if (next && next->divetrip == trip) { - trip->when = next->when; - return; - } - - delete_trip(trip); + add_dive_to_trip(res, trip); + remove_dive_from_trip(pick); + remove_dive_from_trip(remove); } /* |