Filter: reinstate dive-site filter functionality
Commit 201f0c8f89d6d7df96fd220ea2c0d0977c9b7f20 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
@ -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…
x
Reference in New Issue
Block a user