From: SangHyeon Lee Date: Tue, 19 Apr 2016 06:03:34 +0000 (+0900) Subject: genlist: recalc item size after item content field updated X-Git-Tag: accepted/tizen/common/20160421.161517~5^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F74%2F66474%2F1;p=platform%2Fupstream%2Felementary.git genlist: recalc item size after item content field updated after item content fields updated, item and block should be recalculated about it's height because content size can be updated. if do not recaculate, items can be overlapped. Change-Id: Ib00e1f2b68c20a5f6d5d54c739bb2f53a80633ee --- diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 6f1801c..8a319d5 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -6956,8 +6956,9 @@ _elm_genlist_item_fields_update(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it, &GL_IT(it)->deco_all_contents, "contents", parts); } - if (it->has_contents != (!!it->contents)) - it->item->mincalcd = EINA_FALSE; + //forcely recalc about item because even same content, size can be changed. + it->item->mincalcd = EINA_FALSE; + it->item->block->must_recalc = EINA_TRUE; it->has_contents = !!it->contents; if (it->item->type == ELM_GENLIST_ITEM_NONE) { @@ -6974,7 +6975,10 @@ _elm_genlist_item_fields_update(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it, _item_state_realize(it, VIEW(it), parts); if (!it->item->mincalcd) - elm_genlist_item_update(eo_item); + { + ELM_SAFE_FREE(it->item->wsd->calc_job, ecore_job_del); + it->item->wsd->calc_job = ecore_job_add(_calc_job, it->item->wsd->obj); + } } EOLIAN static void