From 71b6de05238907dfa602cd583c5904dd7e6cb8fc Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 11 Nov 2014 13:40:36 -0800 Subject: Dive list and filter: when selecting a trip, only select visible dives Otherwise dives that aren't shown to the user would be included in statistics or (worse) in edit operations. Signed-off-by: Dirk Hohndel --- divelist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'divelist.c') diff --git a/divelist.c b/divelist.c index 9034007b7..ad0c2e716 100644 --- a/divelist.c +++ b/divelist.c @@ -869,7 +869,8 @@ void select_dives_in_trip(struct dive_trip *trip) if (!trip) return; for (dive = trip->dives; dive; dive = dive->next) - select_dive(get_divenr(dive)); + if (!dive->hidden_by_filter) + select_dive(get_divenr(dive)); } /* This only gets called with non-NULL trips. -- cgit v1.2.3-70-g09d2