fix for focus handling in case when the panel itself is clicked

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2001-11-25 00:57:06 +00:00
parent faa1ae782d
commit 0dcdeee9e7

View File

@ -273,6 +273,23 @@ bool wxControlContainer::DoSetFocus()
//
// RR: Removed for now. Let's see what happens..
// if our child already has focus, don't take it away from it
wxWindow *win = wxWindow::FindFocus();
while ( win )
{
if ( win == m_winParent )
return TRUE;
if ( win->IsTopLevel() )
{
// don't look beyond the first top level parent - useless and
// unnecessary
break;
}
win = win->GetParent();
}
return SetFocusToChild();
}