diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-02-10 21:00:26 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-02-22 15:18:31 -0800 |
commit | be3d7bffc610a0e6e70cd00919197a0adf213d70 (patch) | |
tree | 42fe8e57849f0716499d4a02e380308bd16f6910 /qt-models/divetripmodel.cpp | |
parent | 03a6440b2a1001d0ab1ff7958d42217dd07b1603 (diff) | |
download | subsurface-be3d7bffc610a0e6e70cd00919197a0adf213d70.tar.gz |
Cleanup: remove shown flag of DiveTripModelTree items
Since we now filter at the model level, items are by definition
shown. No need for a flag.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divetripmodel.cpp')
-rw-r--r-- | qt-models/divetripmodel.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 23292384e..09755a9e5 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -702,19 +702,15 @@ QModelIndex DiveTripModelTree::parent(const QModelIndex &index) const } DiveTripModelTree::Item::Item(dive_trip *t, const QVector<dive *> &divesIn) : d_or_t{nullptr, t}, - dives(std::vector<dive *>(divesIn.begin(), divesIn.end())), - shown(std::any_of(dives.begin(), dives.end(), [](dive *d){ return !d->hidden_by_filter; })) + dives(std::vector<dive *>(divesIn.begin(), divesIn.end())) { } -DiveTripModelTree::Item::Item(dive_trip *t, dive *d) : d_or_t{nullptr, t}, - dives({ d }), - shown(!d->hidden_by_filter) +DiveTripModelTree::Item::Item(dive_trip *t, dive *d) : d_or_t{nullptr, t}, dives({ d }) { } -DiveTripModelTree::Item::Item(dive *d) : d_or_t{d, nullptr}, - shown(!d->hidden_by_filter) +DiveTripModelTree::Item::Item(dive *d) : d_or_t{d, nullptr} { } |