focus fixes for wxAUINotebook (fixes #4361)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@59116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3791,6 +3791,21 @@ void wxAuiNotebook::OnTabClicked(wxCommandEvent& command_evt)
|
||||
int idx = m_tabs.GetIdxFromWindow(wnd);
|
||||
wxASSERT(idx != -1);
|
||||
|
||||
|
||||
// since a tab was clicked, let the parent know that we received
|
||||
// the focus, even if we will assign that focus immediately
|
||||
// to the child tab in the SetSelection call below
|
||||
// (the child focus event will also let wxAuiManager, if any,
|
||||
// know that the notebook control has been activated)
|
||||
|
||||
wxWindow* parent = GetParent();
|
||||
if (parent)
|
||||
{
|
||||
wxChildFocusEvent eventFocus(this);
|
||||
parent->GetEventHandler()->ProcessEvent(eventFocus);
|
||||
}
|
||||
|
||||
|
||||
SetSelection(idx);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user