bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a6c102df1f1cb8cb4c51da7e743d00dea859aa83

commit a6c102df1f1cb8cb4c51da7e743d00dea859aa83
Author: Marcel Hollerbach <[email protected]>
Date:   Wed Dec 4 14:20:43 2019 +0100

    efl_canvas_animation_group: remove implicit children behaviour
    
    you could set the duration of the group to all children, however, the
    default behaviour was to not do that. This is however a bit probeblatic,
    and needs to be more expclicit. If this is needed again, then this can
    be reintroduced, however, not in this form.
    
    ref T8437
    Depends on D10798
    
    Reviewed-by: Xavi Artigas <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D10799
---
 src/lib/evas/Evas_Common.h                       |  1 -
 src/lib/evas/Evas_Eo.h                           |  1 -
 src/lib/evas/canvas/efl_canvas_animation_group.c | 16 +++-------------
 3 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 32cf83b60d..d7fa681094 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -3482,7 +3482,6 @@ typedef Eo Efl_Animation_Group_Sequential;
 
 #endif
 
-#define EFL_ANIMATION_GROUP_DURATION_NONE -1
 #define EFL_ANIMATION_REPEAT_INFINITE -1
 
 // The below type are necessary for legacy API and need to be manually kept in 
sync with .eo file.
diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h
index 58a1f01b6c..f156ec50a8 100644
--- a/src/lib/evas/Evas_Eo.h
+++ b/src/lib/evas/Evas_Eo.h
@@ -122,7 +122,6 @@ typedef Eo Efl_Canvas_Animation_Group_Sequential;
 
 #endif
 
-#define EFL_ANIMATION_GROUP_DURATION_NONE -1
 #define EFL_ANIMATION_REPEAT_INFINITE -1
 
 struct _Efl_Canvas_Animation_Player_Event_Running
diff --git a/src/lib/evas/canvas/efl_canvas_animation_group.c 
b/src/lib/evas/canvas/efl_canvas_animation_group.c
index 8673efd01e..b6a771501f 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_group.c
+++ b/src/lib/evas/canvas/efl_canvas_animation_group.c
@@ -8,10 +8,7 @@ _efl_canvas_animation_group_animation_add(Eo *eo_obj,
    if (!animation) return;
 
    double duration = efl_animation_duration_get(efl_super(eo_obj, MY_CLASS));
-   /* if group animation duration is available value, then the duration is
-    * propagated to its child. */
-   if (duration != EFL_ANIMATION_GROUP_DURATION_NONE)
-     efl_animation_duration_set(animation, duration);
+   efl_animation_duration_set(animation, duration);
 
    Eina_Bool keep_final_state = efl_animation_final_state_keep_get(eo_obj);
    efl_animation_final_state_keep_set(animation, keep_final_state);
@@ -53,9 +50,8 @@ 
_efl_canvas_animation_group_efl_canvas_animation_duration_set(Eo *eo_obj,
                                                 
Efl_Canvas_Animation_Group_Data *pd,
                                                 double duration)
 {
-   if (duration == EFL_ANIMATION_GROUP_DURATION_NONE) goto end;
-
-   if (duration < 0.0) return;
+   efl_animation_duration_set(efl_super(eo_obj, MY_CLASS), duration);
+   duration = efl_animation_duration_get(eo_obj);
 
    Eina_List *l;
    Efl_Canvas_Animation *anim;
@@ -63,9 +59,6 @@ 
_efl_canvas_animation_group_efl_canvas_animation_duration_set(Eo *eo_obj,
      {
         efl_animation_duration_set(anim, duration);
      }
-
-end:
-   efl_animation_duration_set(efl_super(eo_obj, MY_CLASS), duration);
 }
 
 EOLIAN static void
@@ -106,9 +99,6 @@ _efl_canvas_animation_group_efl_object_constructor(Eo 
*eo_obj,
 
    pd->animations = NULL;
 
-   //group animation does not affect its child duration by default.
-   efl_animation_duration_set(eo_obj, EFL_ANIMATION_GROUP_DURATION_NONE);
-
    return eo_obj;
 }
 

-- 


Reply via email to