genlist: recalc item size after item content field updated 74/66474/1
authorSangHyeon Lee <sh10233.lee@samsung.com>
Tue, 19 Apr 2016 06:03:34 +0000 (15:03 +0900)
committerSangHyeon Lee <sh10233.lee@samsung.com>
Tue, 19 Apr 2016 06:03:38 +0000 (15:03 +0900)
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

src/lib/elm_genlist.c

index 6f1801c..8a319d5 100644 (file)
@@ -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