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>
This commit is contained in:
Berthold Stoeger 2019-04-29 08:17:41 +02:00 committed by Dirk Hohndel
parent 23cf85e89c
commit 3e05d61eb9
3 changed files with 19 additions and 2 deletions

View file

@ -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.