diff options
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 8bae01d86..cc98286a2 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -1275,8 +1275,6 @@ bool QMLManager::undoDelete(int id) struct dive_trip *trip = deletedDive->divetrip; tripflag_t tripflag = deletedDive->tripflag; // this gets overwritten in add_dive_to_trip() deletedDive->divetrip = NULL; - deletedDive->next = NULL; - deletedDive->pprev = NULL; add_dive_to_trip(deletedDive, trip); deletedDive->tripflag = tripflag; } @@ -1309,11 +1307,11 @@ void QMLManager::deleteDive(int id) memset(deletedTrip, 0, sizeof(struct dive_trip)); } // if this is the last dive in that trip, remember the trip as well - if (d->divetrip && d->divetrip->nrdives == 1) { + if (d->divetrip && d->divetrip->dives.nr == 1) { *deletedTrip = *d->divetrip; deletedTrip->location = copy_string(d->divetrip->location); deletedTrip->notes = copy_string(d->divetrip->notes); - deletedTrip->nrdives = 0; + deletedTrip->dives.nr = 0; deletedDive->divetrip = deletedTrip; } DiveListModel::instance()->removeDiveById(id); |