From 36abf4a5826a00be95721dc8750540911bdb88f9 Mon Sep 17 00:00:00 2001 From: David Steele Date: Mon, 14 Dec 2020 14:06:05 +0000 Subject: [PATCH] Ensure actor size is set to node if different Change-Id: I9a47c38321d7753747261f7bd140a6cb58330d58 --- dali/internal/event/actors/actor-impl.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp index f2ae10b..2eabd0c 100644 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -798,9 +798,14 @@ void Actor::SetSizeInternal(const Vector3& size) // dont allow recursive loop DALI_ASSERT_ALWAYS(!mInsideOnSizeSet && "Cannot call SetSize from OnSizeSet"); // check that we have a node AND the new size width, height or depth is at least a little bit different from the old one - if((fabsf(mTargetSize.width - size.width) > Math::MACHINE_EPSILON_1) || - (fabsf(mTargetSize.height - size.height) > Math::MACHINE_EPSILON_1) || - (fabsf(mTargetSize.depth - size.depth) > Math::MACHINE_EPSILON_1)) + Vector3 currentSize = GetCurrentSize(); + + if( ( fabsf( mTargetSize.width - size.width ) > Math::MACHINE_EPSILON_1 )|| + ( fabsf( mTargetSize.height- size.height ) > Math::MACHINE_EPSILON_1 )|| + ( fabsf( mTargetSize.depth - size.depth ) > Math::MACHINE_EPSILON_1 )|| + ( fabsf( mTargetSize.width - currentSize.width ) > Math::MACHINE_EPSILON_1 )|| + ( fabsf( mTargetSize.height- currentSize.height ) > Math::MACHINE_EPSILON_1 )|| + ( fabsf( mTargetSize.depth - currentSize.depth ) > Math::MACHINE_EPSILON_1 ) ) { mTargetSize = size; -- 2.7.4