[Tizen] Workaround in AbsoluteLayout for animation bug in legacy application.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / layouting / absolute-layout-impl.cpp
index ebd70a7..d69f773 100644 (file)
@@ -21,6 +21,7 @@
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/common/extents.h>
 #include <dali/public-api/actors/actor.h>
+#include <dali/devel-api/actors/actor-devel.h>
 #include <dali-toolkit/devel-api/layouting/layout-item.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/internal/controls/control/control-data-impl.h>
@@ -99,15 +100,6 @@ void AbsoluteLayout::OnMeasure( MeasureSpec widthMeasureSpec, MeasureSpec height
       // Determine the width and height needed by the children using their given position and size.
       // Children could overlap so find the left most and right most child.
       auto childPosition = childOwner.GetProperty< Vector3 >( Actor::Property::POSITION );
-      auto childSize = childOwner.GetProperty< Vector3 >( Actor::Property::SIZE );
-
-      // Check if there on going position or size animation and skip it to avoid legacy application regressions
-      if( childPosition != childOwner.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) ||
-          childSize != childOwner.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) )
-      {
-        break;
-      }
-
       LayoutLength childLeft = childPosition.x;
       LayoutLength childTop = childPosition.y;
 
@@ -167,13 +159,11 @@ void AbsoluteLayout::OnLayout( bool changed, LayoutLength left, LayoutLength top
       LayoutLength childHeight = childLayout->GetMeasuredHeight();
 
       auto childPosition = childOwner.GetProperty< Vector3 >( Actor::Property::POSITION );
-      auto childSize = childOwner.GetProperty< Vector3 >( Actor::Property::SIZE );
-
       // Check if there on going position or size animation and skip it to avoid legacy application regressions
-      if( childPosition != childOwner.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) ||
-          childSize != childOwner.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) )
+      if( DevelActor::IsPositionOrSizeCurrentlyAnimating( Actor::DownCast( childOwner ) ) &&
+          !childLayout->IsLayoutAnimated() )
       {
-        break;
+        continue;
       }
 
       LayoutLength childTop = childPosition.y;