From: Prince Kr Dubey Date: Mon, 22 Jun 2015 09:51:20 +0000 (+0200) Subject: genlist: fix Issue "In Tree effect feature, items floates when number of item crosses... X-Git-Tag: v1.15.0-alpha1~160 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ad226a6c4a9ebccdbd861d47b713163379b3d87;p=platform%2Fupstream%2Felementary.git genlist: fix Issue "In Tree effect feature, items floates when number of item crosses item block size". Summary: "In Tree effect feature, during expansion of tree, when total number of items crosses block count, items start floating". Test Plan: Run elementary_test, open Genlist Tree, keep expanding items untill it crosses number of count 32 (Block count). Resize the window, floting items can be seen. Reviewers: raster, cedric Subscribers: shilpasingh, poornima.srinivasan, govi, rajeshps Differential Revision: https://phab.enlightenment.org/D2627 Signed-off-by: Cedric BAIL --- diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index a4936b0..dbd7c3d 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -1067,6 +1067,9 @@ _item_tree_effect_finish(Elm_Genlist_Data *sd) { Elm_Object_Item *eo_it = NULL; const Eina_List *l; + Item_Block *itb; + Elm_Gen_Item *it1; + Evas_Coord y = 0; if (sd->tree_effect_animator) { @@ -1086,6 +1089,22 @@ _item_tree_effect_finish(Elm_Genlist_Data *sd) edje_object_signal_emit(VIEW(it), SIGNAL_SHOW, "elm"); } } + if (sd->move_effect_mode == + ELM_GENLIST_TREE_EFFECT_EXPAND) + { + EINA_INLIST_FOREACH(sd->blocks, itb) + { + EINA_LIST_FOREACH(itb->items, l, it1) + { + if (it1->item->scrl_y <= y) + { + it1->item->scrl_y = y + it1->item->h; + _elm_genlist_item_unrealize(it1, EINA_FALSE); + } + y = it1->item->scrl_y; + } + } + } } _item_auto_scroll(sd);