fixed stupid bug in tab traversal code which totally broke it whenever mouse was used to change focus

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2001-11-28 00:34:44 +00:00
parent fbdb357ea2
commit 6f20c54861

View File

@ -51,9 +51,13 @@ wxControlContainer::wxControlContainer(wxWindow *winParent)
void wxControlContainer::SetLastFocus(wxWindow *win)
{
// find the last _immediate_ child which got focus
while ( win && win != m_winParent )
while ( win )
{
win = win->GetParent();
wxWindow *winParent = win->GetParent();
if ( winParent == m_winParent )
break;
win = winParent;
}
wxASSERT_MSG( win, _T("attempt to set last focus to not a child?") );