mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Deselect dives that are no longer shown as the dive list is filtered
This cleans up the way we ensure that all dives are handled as the dive list is filtered. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
71b6de0523
commit
0b31854031
4 changed files with 22 additions and 8 deletions
10
divelist.c
10
divelist.c
|
|
@ -873,6 +873,16 @@ void select_dives_in_trip(struct dive_trip *trip)
|
|||
select_dive(get_divenr(dive));
|
||||
}
|
||||
|
||||
void filter_dive(struct dive *d, bool shown)
|
||||
{
|
||||
if (!d)
|
||||
return;
|
||||
d->hidden_by_filter = !shown;
|
||||
if (!shown && d->selected)
|
||||
deselect_dive(get_divenr(d));
|
||||
}
|
||||
|
||||
|
||||
/* This only gets called with non-NULL trips.
|
||||
* It does not combine notes or location, just picks the first one
|
||||
* (or the second one if the first one is empty */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue