diff options
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/divelistview.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp index 409b22e38..c012b9832 100644 --- a/desktop-widgets/divelistview.cpp +++ b/desktop-widgets/divelistview.cpp @@ -348,8 +348,7 @@ void DiveListView::clearTripSelection() // we want to make sure no trips are selected Q_FOREACH (const QModelIndex &index, selectionModel()->selectedRows()) { - dive_trip_t *trip = index.data(DiveTripModelBase::TRIP_ROLE).value<dive_trip *>(); - if (!trip) + if (!index.data(DiveTripModelBase::IS_TRIP_ROLE).toBool()) continue; selectionModel()->select(index, QItemSelectionModel::Deselect); } |