summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/filtermodels.cpp5
-rw-r--r--qt-models/filtermodels.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp
index bc454bcc9..663037383 100644
--- a/qt-models/filtermodels.cpp
+++ b/qt-models/filtermodels.cpp
@@ -278,6 +278,11 @@ void MultiFilterSortModel::stopFilterDiveSites()
myInvalidate();
}
+bool MultiFilterSortModel::diveSiteMode() const
+{
+ return !dive_sites.isEmpty();
+}
+
bool MultiFilterSortModel::lessThan(const QModelIndex &i1, const QModelIndex &i2) const
{
// Hand sorting down to the source model.
diff --git a/qt-models/filtermodels.h b/qt-models/filtermodels.h
index 258b4186b..7520fbe16 100644
--- a/qt-models/filtermodels.h
+++ b/qt-models/filtermodels.h
@@ -63,6 +63,7 @@ public:
bool updateDive(struct dive *d); // returns true if visibility status changed
int divesDisplayed;
bool lessThan(const QModelIndex &, const QModelIndex &) const override;
+ bool diveSiteMode() const; // returns true if we're filtering on dive site
public
slots:
void myInvalidate();