diff options
Diffstat (limited to 'qt-models/filtermodels.cpp')
-rw-r--r-- | qt-models/filtermodels.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp index 0226e1220..27bb33856 100644 --- a/qt-models/filtermodels.cpp +++ b/qt-models/filtermodels.cpp @@ -228,8 +228,7 @@ void MultiFilterSortModel::myInvalidate() for (int i = 0; i < m->rowCount(QModelIndex()); ++i) { QModelIndex idx = m->index(i, 0, QModelIndex()); - dive_trip *trip = m->data(idx, DiveTripModelBase::TRIP_ROLE).value<dive_trip *>(); - if (trip) { + if (m->data(idx, DiveTripModelBase::IS_TRIP_ROLE).toBool()) { // This is a trip -> loop over all dives and see if any is selected bool showTrip = false; |