summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/filtermodels.cpp6
-rw-r--r--qt-models/filtermodels.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp
index 4e4134033..8609243b2 100644
--- a/qt-models/filtermodels.cpp
+++ b/qt-models/filtermodels.cpp
@@ -138,6 +138,12 @@ bool MultiFilterSortModel::showDive(const struct dive *d) const
if (!hasEquipment(filterData.equipment, d))
return false;
+ // Planned/Logged
+ if (!filterData.logged && !has_planned(d, true))
+ return false;
+ if (!filterData.planned && !has_planned(d, false))
+ return false;
+
return true;
}
diff --git a/qt-models/filtermodels.h b/qt-models/filtermodels.h
index a8a601ecc..b16ce4a3b 100644
--- a/qt-models/filtermodels.h
+++ b/qt-models/filtermodels.h
@@ -30,6 +30,8 @@ struct FilterData {
QStringList people;
QStringList location;
QStringList equipment;
+ bool logged = true;
+ bool planned = true;
bool invertFilter;
};