genlist: call update_job after smart_calculation done
authorSangHyeon Lee <sh10233.lee@samsung.com>
Tue, 19 Apr 2016 09:41:43 +0000 (18:41 +0900)
committerSangHyeon Lee <sh10233.lee@samsung.com>
Tue, 19 Apr 2016 09:43:55 +0000 (18:43 +0900)
Summary :
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.

@fix

src/lib/elementary/elm_genlist.c

index eccb493..430c10a 100644 (file)
@@ -150,6 +150,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);
@@ -2538,6 +2539,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));