Improve the check for TLW in focus handling code
Use IsTopNavigationDomain() instead of IsTopLevel() to do the right thing for MDI child frames too.
This commit is contained in:
@@ -711,8 +711,15 @@ bool wxSetFocusToChild(wxWindow *win, wxWindow **childLastFocused)
|
|||||||
else
|
else
|
||||||
deepestVisibleWindow = NULL;
|
deepestVisibleWindow = NULL;
|
||||||
|
|
||||||
if ( (*childLastFocused)->IsTopLevel() )
|
// We shouldn't be looking for the child to focus beyond the
|
||||||
|
// TLW boundary. And we use IsTopNavigationDomain() here
|
||||||
|
// instead of IsTopLevel() because wxMDIChildFrame is also TLW
|
||||||
|
// from this point of view.
|
||||||
|
if ( (*childLastFocused)->
|
||||||
|
IsTopNavigationDomain(wxWindow::Navigation_Tab) )
|
||||||
|
{
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
*childLastFocused = (*childLastFocused)->GetParent();
|
*childLastFocused = (*childLastFocused)->GetParent();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user