From: Jaehwan Kim <jae.hwan.kim@samsung.com>
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 20 Jun 2011 07:20:31 +0000 (07:20 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 20 Jun 2011 07:20:31 +0000 (07:20 +0000)
Subject: [E-devel]  [patch] els_scroller simple bug

els_scroller in elementary has a simple bug.

In the function "_smart_scrollto_x", it makes the animator
'sd->scrollto.x.animator', if the animator does not exist. But
"_smart_anim_start" before ecore_animator_add can make 2 animators.
If the function which be called by _smart_anim_start call
"elm_scroller_region_bring_in", "_smart_scrollto_x" be called again and make
the animator. After the function which be called by _smart_snim_start ends,
the next line will make the animtor again. Despite the code checks the
animator, it can make 2 animators. So we have to change the order of the code
like patch file.

git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@60507 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/els_scroller.c

index 7938f00..5ccdaad 100644 (file)
@@ -498,9 +498,9 @@ _smart_scrollto_x(Smart_Data *sd, double t_in, Evas_Coord pos_x)
    sd->scrollto.x.t_end = t + t_in;
    if (!sd->scrollto.x.animator)
      {
+        sd->scrollto.x.animator = ecore_animator_add(_smart_scrollto_x_animator, sd);
         if (!sd->scrollto.y.animator)
           _smart_anim_start(sd->smart_obj);
-        sd->scrollto.x.animator = ecore_animator_add(_smart_scrollto_x_animator, sd);
      }
    if (sd->down.bounce_x_animator)
      {
@@ -562,9 +562,9 @@ _smart_scrollto_y(Smart_Data *sd, double t_in, Evas_Coord pos_y)
    sd->scrollto.y.t_end = t + t_in;
    if (!sd->scrollto.y.animator)
      {
+        sd->scrollto.y.animator = ecore_animator_add(_smart_scrollto_y_animator, sd);
         if (!sd->scrollto.x.animator)
           _smart_anim_start(sd->smart_obj);
-        sd->scrollto.y.animator = ecore_animator_add(_smart_scrollto_y_animator, sd);
      }
    if (sd->down.bounce_y_animator)
      {