aboutsummaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-12 14:10:49 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-12 14:10:49 -0800
commit2295e0c21ec403d3d026544b612ec84269843285 (patch)
tree04c1a651014e3c64a4d093edb2cdb13b5d428c77 /divelist.c
parent0b7370adeb8fc966e90c0b62d6a5ff55cf3bec3b (diff)
parent0b318540318ffa62318f0d9b74c2b14306bd0d97 (diff)
downloadsubsurface-2295e0c21ec403d3d026544b612ec84269843285.tar.gz
Merge branch 'fixFilterSelection'
Diffstat (limited to 'divelist.c')
-rw-r--r--divelist.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/divelist.c b/divelist.c
index ad0c2e716..8802aaea1 100644
--- a/divelist.c
+++ b/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 */