summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-models/divetripmodel.cpp10
-rw-r--r--qt-models/divetripmodel.h1
2 files changed, 3 insertions, 8 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}
{
}
diff --git a/qt-models/divetripmodel.h b/qt-models/divetripmodel.h
index 4182f0bd1..39589a8e6 100644
--- a/qt-models/divetripmodel.h
+++ b/qt-models/divetripmodel.h
@@ -137,7 +137,6 @@ private:
struct Item {
dive_or_trip d_or_t;
std::vector<dive *> dives; // std::vector<> instead of QVector for insert() with three iterators
- bool shown;
Item(dive_trip *t, const QVector<dive *> &dives);
Item(dive_trip *t, dive *d); // Initialize a trip with one dive
Item(dive *d); // Initialize a top-level dive