summaryrefslogtreecommitdiffstats
path: root/divelist-gtk.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-21 17:53:24 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-21 17:53:24 -0700
commitd5af4e2ff918d18e329b4753435728feae98b226 (patch)
treef35032d8ef9227a12d0396a85a35ae6338fe426c /divelist-gtk.c
parent2aabcf398a5624c3ff75f7090b70e7038bbeb017 (diff)
downloadsubsurface-d5af4e2ff918d18e329b4753435728feae98b226.tar.gz
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>
Diffstat (limited to 'divelist-gtk.c')
-rw-r--r--divelist-gtk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/divelist-gtk.c b/divelist-gtk.c
index 2f6e12de7..f523805c1 100644
--- a/divelist-gtk.c
+++ b/divelist-gtk.c
@@ -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;