elementary/transit - fixed to repeat times provide infinite times actually.
authorChunEon Park <hermet@hermet.pe.kr>
Mon, 28 Mar 2011 01:23:38 +0000 (01:23 +0000)
committerChunEon Park <hermet@hermet.pe.kr>
Mon, 28 Mar 2011 01:23:38 +0000 (01:23 +0000)
SVN revision: 58137

src/bin/test_transit.c
src/lib/elm_transit.c

index 02c5480..5d8a483 100644 (file)
@@ -511,6 +511,7 @@ test_transit8(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    trans = elm_transit_add();
    elm_transit_auto_reverse_set(trans, EINA_TRUE);
    elm_transit_tween_mode_set(trans, ELM_TRANSIT_TWEEN_MODE_DECELERATE);
+   //Negative value makes transition repeate for infinite times. 
    elm_transit_repeat_times_set(trans, -1);
    effect_context = _custom_context_new(100, 100, 250, 250);
    elm_transit_object_add(trans, bt);
index 79d1c6f..502b022 100644 (file)
@@ -289,8 +289,9 @@ _animator_animate_cb(void *data)
    if (elapsed_time < duration) return ECORE_CALLBACK_RENEW;
 
    /* Repeat and reverse and time done! */
-   if ((transit->repeat.current == transit->repeat.count)
-       && (!transit->auto_reverse || transit->repeat.reverse))
+   if ((transit->repeat.count >= 0) &&
+       (transit->repeat.current == transit->repeat.count) &&
+       ((!transit->auto_reverse) || transit->repeat.reverse))
      {
         elm_transit_del(transit);
         return ECORE_CALLBACK_CANCEL;