From a73cb5c5bc281fe403a342c8d83b575a0c186123 Mon Sep 17 00:00:00 2001 From: Victor Cebollada Date: Thu, 25 Jun 2015 10:33:09 +0100 Subject: [PATCH 1/1] Fix for SizeNegotiation. The RelayoutController::RequestRelayout() does not add a dirty Actor to the request list if it has a child which is not dependant on it. Change-Id: I7f4131d58dfe4a7135cf7e3e8077c86e83b44133 Signed-off-by: Victor Cebollada --- .../size-negotiation/relayout-controller-impl.cpp | 29 +++++++++++++--------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/dali/internal/event/size-negotiation/relayout-controller-impl.cpp b/dali/internal/event/size-negotiation/relayout-controller-impl.cpp index 66a707a..9c2120a 100644 --- a/dali/internal/event/size-negotiation/relayout-controller-impl.cpp +++ b/dali/internal/event/size-negotiation/relayout-controller-impl.cpp @@ -162,20 +162,25 @@ void RelayoutController::RequestRelayout( Dali::Actor& actor, Dimension::Type di } } - // Request this actor as head of sub-tree if it is not dependent on a parent that is dirty - Dali::Actor subTreeActor = topOfSubTreeStack.back(); - Dali::Actor parent = subTreeActor.GetParent(); - if( !parent || !( GetImplementation( subTreeActor ).RelayoutDependentOnParent() && GetImplementation( parent ).RelayoutRequired() ) ) + while( !topOfSubTreeStack.empty() ) { - // Add sub tree root to relayout list - AddRequest( subTreeActor ); + // Request this actor as head of sub-tree if it is not dependent on a parent that is dirty + Dali::Actor subTreeActor = topOfSubTreeStack.back(); + topOfSubTreeStack.pop_back(); - // Flag request for end of frame - Request(); - } - else - { - potentialRedundantSubRoots.push_back( subTreeActor ); + Dali::Actor parent = subTreeActor.GetParent(); + if( !parent || !( GetImplementation( subTreeActor ).RelayoutDependentOnParent() && GetImplementation( parent ).RelayoutRequired() ) ) + { + // Add sub tree root to relayout list + AddRequest( subTreeActor ); + + // Flag request for end of frame + Request(); + } + else + { + potentialRedundantSubRoots.push_back( subTreeActor ); + } } // Remove any redundant sub-tree heads -- 2.7.4