From b62190e739de7f2e5321ec2ecd2b10c1e1ccf25e Mon Sep 17 00:00:00 2001 From: Park Kyoung Hee Date: Tue, 14 May 2013 17:53:57 +0900 Subject: [PATCH] fix prevent issue 53384, 53385 on Panel Change-Id: I6f3835604bb64f1be9666d01f9b3225b6e3e7946 Signed-off-by: Park Kyoung Hee --- src/ui/controls/FUiCtrl_PanelImpl.cpp | 13 +++++++++---- src/ui/inc/FUiCtrl_PanelImpl.h | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/ui/controls/FUiCtrl_PanelImpl.cpp b/src/ui/controls/FUiCtrl_PanelImpl.cpp index 3e95345..5404848 100644 --- a/src/ui/controls/FUiCtrl_PanelImpl.cpp +++ b/src/ui/controls/FUiCtrl_PanelImpl.cpp @@ -199,7 +199,7 @@ _PanelImpl::OnAttachedToMainTree(void) SysLogException(NID_UI_CTRL, r, "[%s] SetBounds failed", GetErrorMessage(r)); } - SetChildBuilderBouds(this, controlOrientation); + SetChildBuilderBounds(this, controlOrientation); } } @@ -209,19 +209,24 @@ _PanelImpl::OnAttachedToMainTree(void) } void -_PanelImpl::SetChildBuilderBouds(_ContainerImpl* pContainerImpl, _ControlOrientation controlOrientation) +_PanelImpl::SetChildBuilderBounds(_ContainerImpl* pContainerImpl, _ControlOrientation controlOrientation) { FloatRectangle builderBounds; _ContainerImpl* pTempContainerImpl; for(int i = 0; i < pContainerImpl->GetChildCount(); i++) { _ControlImpl* pControlImpl = pContainerImpl->GetChild(i); - pControlImpl->GetBuilderBoundsF(controlOrientation, builderBounds); + bool exist = pControlImpl->GetBuilderBoundsF(controlOrientation, builderBounds); + if (!exist) + { + continue; + } + pControlImpl->SetBounds(builderBounds); pTempContainerImpl = dynamic_cast<_ContainerImpl*>(pControlImpl); if (pTempContainerImpl != null) { - SetChildBuilderBouds(pTempContainerImpl, controlOrientation); + SetChildBuilderBounds(pTempContainerImpl, controlOrientation); } } diff --git a/src/ui/inc/FUiCtrl_PanelImpl.h b/src/ui/inc/FUiCtrl_PanelImpl.h index ae83088..218ebb7 100644 --- a/src/ui/inc/FUiCtrl_PanelImpl.h +++ b/src/ui/inc/FUiCtrl_PanelImpl.h @@ -72,7 +72,7 @@ public: protected: _PanelImpl(Control* pPublic, _Control* pCore, Layout* pPublicPortraitLayout = null, Layout* pPublicLandscapeLayout = null); - void SetChildBuilderBouds(_ContainerImpl* pContainerImpl, _ControlOrientation controlOrientation); + void SetChildBuilderBounds(_ContainerImpl* pContainerImpl, _ControlOrientation controlOrientation); private: // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. -- 2.7.4