From f51eb107325d142d5a565bb7e7d2d34ae968674a Mon Sep 17 00:00:00 2001 From: Anton Obzhirov Date: Thu, 6 Sep 2018 16:04:22 +0100 Subject: [PATCH] Change LayoutItem::SetParent to set LayoutItem::Impl::PRIVATE_FLAG_FORCE_SET_FRAME flag. Now it is setting in LayoutItem::SetFrame and clearing in LayoutItem::SetParent, should be swapped. Change-Id: Ifca2a432d119600fb4ff3a9351469e26d2661a02 --- dali-toolkit/devel-api/layouting/layout-item-impl.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dali-toolkit/devel-api/layouting/layout-item-impl.cpp b/dali-toolkit/devel-api/layouting/layout-item-impl.cpp index 78cd532..d68e544 100644 --- a/dali-toolkit/devel-api/layouting/layout-item-impl.cpp +++ b/dali-toolkit/devel-api/layouting/layout-item-impl.cpp @@ -310,10 +310,7 @@ void LayoutItem::OnLayout( bool changed, LayoutLength left, LayoutLength top, La void LayoutItem::SetParent( LayoutParent* parent ) { mImpl->mLayoutParent = parent; - if ( parent == nullptr ) - { - mImpl->ClearPrivateFlag( Impl::PRIVATE_FLAG_FORCE_SET_FRAME ); - } + mImpl->SetPrivateFlag( Impl::PRIVATE_FLAG_FORCE_SET_FRAME ); } LayoutParent* LayoutItem::GetParent() @@ -438,7 +435,7 @@ bool LayoutItem::SetFrame( LayoutLength left, LayoutLength top, LayoutLength rig DALI_LOG_STREAM( gLayoutFilter, Debug::Verbose, "LayoutItem::SetFrame enter(" << left << ", " << top << ", " << right << ", " << bottom << ")\n" ); - if( mImpl->mLeft != left || mImpl->mRight != right || mImpl->mTop != top || mImpl->mBottom != bottom || !mImpl->GetPrivateFlag( Impl::PRIVATE_FLAG_FORCE_SET_FRAME ) ) + if( mImpl->mLeft != left || mImpl->mRight != right || mImpl->mTop != top || mImpl->mBottom != bottom || mImpl->GetPrivateFlag( Impl::PRIVATE_FLAG_FORCE_SET_FRAME ) ) { changed = true; @@ -453,7 +450,7 @@ bool LayoutItem::SetFrame( LayoutLength left, LayoutLength top, LayoutLength rig mImpl->mRight = right; mImpl->mBottom = bottom; - mImpl->SetPrivateFlag( Impl::PRIVATE_FLAG_FORCE_SET_FRAME ); + mImpl->ClearPrivateFlag( Impl::PRIVATE_FLAG_FORCE_SET_FRAME ); // Reflect up to parent control -- 2.7.4