diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-04-29 08:17:41 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-05-11 12:06:19 -0700 |
commit | 3e05d61eb95f5b26d0382ff87451cbe5b59fc9ec (patch) | |
tree | 949ea9b51606012cd1fa1da2a629cce464f92e49 /qt-models/filtermodels.cpp | |
parent | 23cf85e89c7f09281bedd7e704c867049c84cbe8 (diff) | |
download | subsurface-3e05d61eb95f5b26d0382ff87451cbe5b59fc9ec.tar.gz |
Map: show all dive sites when in dive-site filter mode
When on the dive site tab or editing a dive site, we want
to show all dive sites so that the user can related different
dive sites. Therefore export a "in dive site mode" flag from
the filter model and don't filter in that case in MapWidgetHelper.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/filtermodels.cpp')
-rw-r--r-- | qt-models/filtermodels.cpp | 5 |
1 files changed, 5 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. |