}
else if (childCount > 0)
{
- _FormImpl* pCurrentForm = dynamic_cast<_FormImpl*>(GetChild(childCount - 1));
- SysTryReturnVoidResult(NID_UI_CTRL, pCurrentForm, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- pCurrentForm->UpdateOrientationStatus(true);
+ _Control* pControl = GetCore().GetChild(childCount - 1);
+ _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(pControl->GetUserData());
+ _FormImpl* pCurrentFormImpl = dynamic_cast<_FormImpl*>(pControlImpl);
+ SysTryReturnVoidResult(NID_UI_CTRL, pCurrentFormImpl, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ pCurrentFormImpl->UpdateOrientationStatus(true);
}
}