From be3d7bffc610a0e6e70cd00919197a0adf213d70 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 10 Feb 2020 21:00:26 +0100 Subject: 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 --- qt-models/divetripmodel.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'qt-models/divetripmodel.cpp') 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 &divesIn) : d_or_t{nullptr, t}, - dives(std::vector(divesIn.begin(), divesIn.end())), - shown(std::any_of(dives.begin(), dives.end(), [](dive *d){ return !d->hidden_by_filter; })) + dives(std::vector(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} { } -- cgit v1.2.3-70-g09d2