From 0f49d4c38f95a01b04c9218c0df586b697b95a00 Mon Sep 17 00:00:00 2001 From: raster Date: Mon, 20 Jun 2011 07:20:31 +0000 Subject: [PATCH] From: Jaehwan Kim 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: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@60507 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/els_scroller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/els_scroller.c b/src/lib/els_scroller.c index 7938f00..5ccdaad 100644 --- a/src/lib/els_scroller.c +++ b/src/lib/els_scroller.c @@ -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) { -- 2.7.4