Simplistic filtering by tags

This only allows for a logical "AND" - so only dives that all of the
selected tags are displayed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-04-21 17:53:24 -07:00
parent 2aabcf398a
commit d5af4e2ff9
3 changed files with 9 additions and 2 deletions

View file

@ -695,7 +695,8 @@ static void fill_dive_list(void)
while (--i >= 0) {
struct dive *dive = get_dive(i);
dive_trip_t *trip;
if ((dive->dive_tags & DTAG_INVALID) && !prefs.display_invalid_dives)
if (((dive->dive_tags & DTAG_INVALID) && !prefs.display_invalid_dives) ||
(dive->dive_tags & dive_mask) != dive_mask)
continue;
trip = dive->divetrip;