diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-11-08 16:58:33 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-11-18 16:50:09 -0800 |
commit | 6b283e598a3a08c6133d66b5d5617370296e7d0e (patch) | |
tree | 685ccf1fd839d72471b179bf12aa72d2bdcec7de /qt-models/filtermodels.cpp | |
parent | bc7afebc23477ef23f2b9741bf45b2180cbafe15 (diff) | |
download | subsurface-6b283e598a3a08c6133d66b5d5617370296e7d0e.tar.gz |
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 <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/filtermodels.cpp')
-rw-r--r-- | qt-models/filtermodels.cpp | 4 |
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; |