From 0f183b07ce84cd1349453d4c958d59e228e085e7 Mon Sep 17 00:00:00 2001 From: minkyu kim Date: Mon, 15 Jul 2013 16:27:27 +0900 Subject: [PATCH] N_SE-46076 : if it's failed to find source control's ControlImpl, look for the source's parent ControlImpl Change-Id: Ieb52d516c5e45e16d1b15c8731980908f6b311ce --- src/ui/FUi_ControlImpl.cpp | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/src/ui/FUi_ControlImpl.cpp b/src/ui/FUi_ControlImpl.cpp index 25e8c2f..98dcf76 100644 --- a/src/ui/FUi_ControlImpl.cpp +++ b/src/ui/FUi_ControlImpl.cpp @@ -1894,6 +1894,20 @@ public: if (__impl.__pPublicPropagatedKeyEventListener != null) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); + if (pControlImpl == null) + { + _Control* pParentControl = source.GetParent(); + while (pParentControl) + { + pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData()); + if (pControlImpl) + { + break; + } + + pParentControl = pParentControl->GetParent(); + } + } SysTryReturn(NID_UI, pControlImpl, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null."); Control& control = static_cast(pControlImpl->GetPublic()); @@ -1961,6 +1975,20 @@ public: if (__impl.__pPublicPropagatedKeyEventListener != null) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); + if (pControlImpl == null) + { + _Control* pParentControl = source.GetParent(); + while (pParentControl) + { + pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData()); + if (pControlImpl) + { + break; + } + + pParentControl = pParentControl->GetParent(); + } + } SysTryReturn(NID_UI, pControlImpl, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null."); Control& control = static_cast(pControlImpl->GetPublic()); @@ -2019,6 +2047,20 @@ public: if (__impl.__pPublicPropagatedKeyEventListener != null) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); + if (pControlImpl == null) + { + _Control* pParentControl = source.GetParent(); + while (pParentControl) + { + pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData()); + if (pControlImpl) + { + break; + } + + pParentControl = pParentControl->GetParent(); + } + } SysTryReturn(NID_UI, pControlImpl, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null."); Control& control = static_cast(pControlImpl->GetPublic()); @@ -2053,6 +2095,20 @@ public: if (__impl.__pPublicPropagatedKeyEventListener != null) { _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData()); + if (pControlImpl == null) + { + _Control* pParentControl = source.GetParent(); + while (pParentControl) + { + pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData()); + if (pControlImpl) + { + break; + } + + pParentControl = pParentControl->GetParent(); + } + } SysTryReturn(NID_UI, pControlImpl, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null."); Control& control = static_cast(pControlImpl->GetPublic()); -- 2.7.4