genlist : call update_job after smart_calculation done 31/66531/2
authorSangHyeon Lee <sh10233.lee@samsung.com>
Tue, 19 Apr 2016 09:46:04 +0000 (18:46 +0900)
committerJee-Yong Um <jc9.um@samsung.com>
Wed, 20 Apr 2016 05:53:58 +0000 (22:53 -0700)
if item_update happens before the smart calcuate finished,
item can be delayed updated(next frame).
to prevent this issue, if unsolved job is remaining after
smart calc done, call update_job directly and remove job.

Change-Id: Ia2b3e39a141d07678f1ca70f251c39dcbc697236
Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
src/lib/elm_genlist.c

index 3092b73..402ce32 100644 (file)
@@ -153,6 +153,7 @@ static Eina_Bool _key_action_move(Evas_Object *obj, const char *params);
 static Eina_Bool _key_action_select(Evas_Object *obj, const char *params);
 static Eina_Bool _key_action_escape(Evas_Object *obj, const char *params);
 static void  _calc_job(void *data);
+static void _update_job(void *data);
 static Eina_Bool _item_block_recalc(Item_Block *itb, int in, Eina_Bool qadd);
 static void _item_mouse_callbacks_add(Elm_Gen_Item *it, Evas_Object *view);
 static void _item_mouse_callbacks_del(Elm_Gen_Item *it, Evas_Object *view);
@@ -2482,6 +2483,13 @@ _elm_genlist_pan_evas_object_smart_calculate(Eo *obj, Elm_Genlist_Pan_Data *psd)
         if (git->realized) evas_object_raise(VIEW(git));
      }
 
+   //update item before the render to prevent delayed update by job.
+   if (sd->update_job)
+     {
+               ELM_SAFE_FREE(sd->update_job, ecore_job_del);
+        _update_job(sd->obj);
+     }
+
    evas_event_thaw(evas_object_evas_get(obj));
    evas_event_thaw_eval(evas_object_evas_get(obj));