From 86f6060d443bb47583495c1ea8aba72c4bb4c714 Mon Sep 17 00:00:00 2001 From: Jaehwan Kim Date: Mon, 18 Jul 2016 18:17:49 +0900 Subject: [PATCH] elementary: fix genlist tree filters Summary: In tree mode if parent item is hidden all its subitems should also be hidden. This commit is made by Andrii Kroitor @fix Change-Id: I7b97bc03b5b945d3e718f4d9e68823d22411e659 --- src/lib/elm_genlist.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index d1b92cd..d61813f 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -7422,9 +7422,11 @@ static void _filter_item_internal(Elm_Gen_Item *it) { ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); - if (sd->filter_data && it->itc->func.filter_get) + if (sd->filter_data) { - if (!it->itc->func.filter_get( + if ((it->parent && !_item_filtered_get(it->parent)) || + (it->itc->func.filter_get && + !it->itc->func.filter_get( (void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), sd->filter_data)) { -- 2.7.4