mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:13:23 +00:00
Filter: reinstate dive-site filter functionality
Commit 201f0c8f89
removed the dive-site
filtering. This is needed for dive-site editing: The list should only
show dives at the corresponding dive-site.
As opposed to the original code, only compare for the actual dive-site,
not for the name of the dive-site. The reason for comparing dive-site
names is unknown.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
37a521eb5d
commit
b3010df14c
1 changed files with 4 additions and 0 deletions
|
@ -100,6 +100,10 @@ void MultiFilterSortModel::resetModel(DiveTripModelBase::Layout layout)
|
|||
|
||||
bool MultiFilterSortModel::showDive(const struct dive *d) const
|
||||
{
|
||||
// If curr_dive_site is set, we are in a special dive-site editing mode.
|
||||
if (curr_dive_site)
|
||||
return d->dive_site == curr_dive_site;
|
||||
|
||||
if (!filterData.validFilter)
|
||||
return true;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue