From 6b283e598a3a08c6133d66b5d5617370296e7d0e Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 8 Nov 2018 16:58:33 +0100 Subject: Dive list: replace dive-list of trips by a table The dives of each trip were kept in a list. Replace this by a struct dive_table. This will make it significantly easier to keep the dives of a trip in sorted state. Signed-off-by: Berthold Stoeger --- qt-models/filtermodels.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qt-models/filtermodels.cpp') 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; -- cgit v1.2.3-70-g09d2