It is possible for a scrolled window to get focus events from children other than

the target window's children (the wxGrid label windows for example) so don't
trigger an assert about it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2007-12-28 17:57:55 +00:00
parent fb8c131d10
commit 9de26f99db

View File

@@ -1359,7 +1359,8 @@ void wxScrollHelper::HandleOnChildFocus(wxChildFocusEvent& event)
while ( win->GetParent() != m_targetWindow )
{
win = win->GetParent();
wxCHECK_RET( win, wxT("incorrectly sent wxChildFocusEvent - not our child") );
if ( !win )
return; // event is not from a child of the target window
}
// if the child is not fully visible, try to scroll it into view: