X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Flayouting%2Flayout-controller-impl.cpp;h=9d0b94784417f52e02ca3c396d9898bc8791da77;hp=746e8e5509ea85c10c6035efda078e8e07efaa77;hb=e3809b21b1d8cf46de15fd7c8367ca30a7e296c6;hpb=f1e46c66db7eb856716d57ebe2b2f0bafb20817a diff --git a/dali-toolkit/internal/layouting/layout-controller-impl.cpp b/dali-toolkit/internal/layouting/layout-controller-impl.cpp index 746e8e5..9d0b947 100644 --- a/dali-toolkit/internal/layouting/layout-controller-impl.cpp +++ b/dali-toolkit/internal/layouting/layout-controller-impl.cpp @@ -82,7 +82,10 @@ void LayoutController::RequestLayout( LayoutItem& layoutItem, int layoutTransiti auto actor = Actor::DownCast( layoutItem.GetOwner() ); if ( actor ) { - DALI_LOG_INFO( gLogFilter, Debug::Concise, "LayoutController::RequestLayout owner[%s] layoutItem[%p] layoutTransitionType(%d)\n", actor.GetName().c_str(), &layoutItem, layoutTransitionType ); + DALI_LOG_INFO( gLogFilter, Debug::Concise, "LayoutController::RequestLayout owner[%s] layoutItem[%p] layoutTransitionType(%d) gainedChild[%s] lostChild[%s]\n", + actor.GetName().c_str(), &layoutItem, layoutTransitionType, + gainedChild ? gainedChild.GetName().c_str() : "", + lostChild ? lostChild.GetName().c_str() : ""); } else { @@ -236,16 +239,19 @@ void LayoutController::UpdateMeasureHierarchyForAnimation( LayoutData& layoutDat continue; } - Actor actor = Actor::DownCast( layoutDataElement.handle ); - LayoutDataAnimator animator = layoutData.layoutAnimatorArray[ layoutDataElement.animatorIndex ]; - float width = actor.GetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION ); - float height = actor.GetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION ); - - if( layoutDataElement.AdjustMeasuredSize( width, height, animator.animatorType ) ) + Actor actor = layoutDataElement.handle.GetHandle(); + if( actor ) { - mActorSizeSpecs.push_back( ActorSizeSpec( actor ) ); - actor.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, static_cast( width ) ); - actor.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, static_cast( height ) ); + LayoutDataAnimator animator = layoutData.layoutAnimatorArray[ layoutDataElement.animatorIndex ]; + float width = actor.GetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION ); + float height = actor.GetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION ); + + if( layoutDataElement.AdjustMeasuredSize( width, height, animator.animatorType ) ) + { + mActorSizeSpecs.push_back( ActorSizeSpec( actor ) ); + actor.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, static_cast( width ) ); + actor.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, static_cast( height ) ); + } } } @@ -294,9 +300,12 @@ void LayoutController::RestoreActorsSpecs() { for( auto& actorSizeSpec : mActorSizeSpecs ) { - Actor actor = actorSizeSpec.actor; - actor.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, actorSizeSpec.widthSpec ); - actor.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, actorSizeSpec.heightSpec ); + Actor actor = actorSizeSpec.actor.GetHandle(); + if( actor ) + { + actor.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, actorSizeSpec.widthSpec ); + actor.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, actorSizeSpec.heightSpec ); + } } } @@ -333,10 +342,10 @@ void LayoutController::PerformLayoutPositioning( LayoutPositionDataArray& layout for( auto layoutPositionData : layoutPositionDataArray ) { - Actor actor = Actor::DownCast( layoutPositionData.handle ); + Actor actor = layoutPositionData.handle.GetHandle(); if( actor && ( !layoutPositionData.animated || all ) ) { - if ( !layoutPositionData.animated ) + if( !layoutPositionData.animated ) { actor.SetPosition( layoutPositionData.left, layoutPositionData.top ); actor.SetSize( layoutPositionData.right - layoutPositionData.left, layoutPositionData.bottom - layoutPositionData.top ); @@ -365,7 +374,7 @@ void LayoutController::PerformLayoutAnimation( LayoutTransition& layoutTransitio { if( layoutDataElement.animatorIndex >= 0 ) { - Actor actor = Actor::DownCast( layoutDataElement.handle ); + Actor actor = layoutDataElement.handle.GetHandle(); if ( actor ) { LayoutDataAnimator animator = layoutAnimatorArray[ layoutDataElement.animatorIndex ];