summaryrefslogtreecommitdiffstats
path: root/qt-models/filtermodels.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/filtermodels.cpp')
-rw-r--r--qt-models/filtermodels.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp
index d335d3f7c..d485684f3 100644
--- a/qt-models/filtermodels.cpp
+++ b/qt-models/filtermodels.cpp
@@ -634,8 +634,8 @@ bool MultiFilterSortModel::filterAcceptsRow(int source_row, const QModelIndex &s
return false; // Oops. Neither dive nor trip, something is seriously wrong.
// Show the trip if any dive is visible
- for (d = trip->dives; d; d = d->next) {
- if (!d->hidden_by_filter)
+ for (int i = 0; i < trip->dives.nr; ++i) {
+ if (!trip->dives.dives[i]->hidden_by_filter)
return true;
}
return false;