X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Factors%2Factor-impl.cpp;h=876182f4f475072d9c8242552caad9e8988ffc30;hb=17f28cc04cbb2708a29a6ef7a353ce15fc434b2d;hp=a3504e5398704e594d8b4cb8157ca463be8ab36c;hpb=da298bea0d5f6dd40092511fcd255b423ceb79e3;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp index a3504e5..876182f 100644 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -1314,6 +1314,9 @@ void Actor::SetSizeScalePolicy( SizeScalePolicy::Type policy ) EnsureRelayoutData(); mRelayoutData->sizeSetPolicy = policy; + + // Trigger relayout on this control + RelayoutRequest(); } SizeScalePolicy::Type Actor::GetSizeScalePolicy() const @@ -2080,9 +2083,13 @@ Actor::~Actor() // Guard to allow handle destruction after Core has been destroyed if( EventThreadServices::IsCoreRunning() ) { - DestroyNodeMessage( GetEventThreadServices().GetUpdateManager(), GetNode() ); + // Root layer will destroy its node in its own destructor + if ( !mIsRoot ) + { + DestroyNodeMessage( GetEventThreadServices().GetUpdateManager(), GetNode() ); - GetEventThreadServices().UnregisterObject( this ); + GetEventThreadServices().UnregisterObject( this ); + } } // Cleanup optional gesture data @@ -3465,6 +3472,15 @@ bool Actor::DoAction( BaseObject* object, const std::string& actionName, const P return done; } +Rect<> Actor::CalculateScreenExtents( ) const +{ + auto screenPosition = GetCurrentScreenPosition(); + Vector3 size = GetCurrentSize() * GetCurrentWorldScale(); + Vector3 anchorPointOffSet = size * ( mPositionUsesAnchorPoint ? GetCurrentAnchorPoint() : AnchorPoint::TOP_LEFT ); + Vector2 position = Vector2( screenPosition.x - anchorPointOffSet.x, screenPosition.y - anchorPointOffSet.y ); + return { position.x, position.y, size.x, size.y }; +} + bool Actor::GetCachedPropertyValue( Property::Index index, Property::Value& value ) const { bool valueSet = true;