From 38aac7342b16814ebf22819ded290d86d8baa204 Mon Sep 17 00:00:00 2001 From: Dave Andreoli Date: Thu, 27 Aug 2015 21:37:50 +0200 Subject: [PATCH] Genlist: reset item tree expanded state when putting item in cache Item expandend state need to be resetted (contracted) when the item goes in the items cache, otherwise when the item will be reused it will have unwanted state (expanded). Quite visible in the "Genlist Tree and Decorate All Mode" test @fix --- src/lib/elm_genlist.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 6e1563e..49afbd8 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -1522,7 +1522,12 @@ _item_cache_add(Elm_Gen_Item *it) itc->spacer = it->spacer; itc->base_view = VIEW(it); itc->item_style = eina_stringshare_add(it->itc->item_style); - if (it->item->type & ELM_GENLIST_ITEM_TREE) itc->tree = 1; + if (it->item->type & ELM_GENLIST_ITEM_TREE) + { + itc->tree = 1; + if (it->item->expanded) + edje_object_signal_emit(itc->base_view, SIGNAL_CONTRACTED, "elm"); + } if (it->selected) edje_object_signal_emit(itc->base_view, SIGNAL_UNSELECTED, "elm"); -- 2.7.4