Revert "[Tizen] Revert the change for 0x0 size of the actor"
authorSunghyun Kim <scholb.kim@samsung.com>
Mon, 22 Jun 2020 09:53:36 +0000 (18:53 +0900)
committerSunghyun Kim <scholb.kim@samsung.com>
Mon, 22 Jun 2020 09:53:36 +0000 (18:53 +0900)
This reverts commit aa8c965b4351394c5a58fafafdbd84abe8e2fce1.

dali/internal/event/actors/actor-impl.cpp

index e6d2b1c270e62a928f9a4a784ebcf0a1319670a0..7710dc5bf57769c2b463aecf01c0866b25d1f30d 100644 (file)
@@ -4707,12 +4707,12 @@ void Actor::SetPreferredSize( const Vector2& size )
   // A 0 width or height may also be required so if the resize policy has not been changed, i.e. is still set to DEFAULT,
   // then change to FIXED as well
 
-  if( size.width > 0.0f )
+  if( size.width > 0.0f || GetResizePolicy( Dimension::WIDTH ) == ResizePolicy::DEFAULT )
   {
     SetResizePolicy( ResizePolicy::FIXED, Dimension::WIDTH );
   }
 
-  if( size.height > 0.0f )
+  if( size.height > 0.0f || GetResizePolicy( Dimension::HEIGHT ) == ResizePolicy::DEFAULT )
   {
     SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
   }