From: Benjamin Williams Date: Thu, 23 Nov 2006 07:09:06 +0000 (+0000) Subject: fixed notebook event bug X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5759a604aa9bd3a5b8fa1b1a4c5f26a085b557fc fixed notebook event bug git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index 91ce0d969e..da29d085e8 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -2806,14 +2806,14 @@ size_t wxAuiNotebook::SetSelection(size_t new_page) evt.SetSelection(new_page); evt.SetOldSelection(m_curpage); evt.SetEventObject(this); - if (!GetEventHandler()->ProcessEvent(evt) || evt.IsAllowed()) + if (!GetParent()->GetEventHandler()->ProcessEvent(evt) || evt.IsAllowed()) { int old_curpage = m_curpage; m_curpage = new_page; // program allows the page change evt.SetEventType(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED); - (void)GetEventHandler()->ProcessEvent(evt); + (void)GetParent()->GetEventHandler()->ProcessEvent(evt); wxAuiTabCtrl* ctrl; @@ -3437,7 +3437,7 @@ void wxAuiNotebook::OnTabButton(wxCommandEvent& command_evt) e.SetSelection(m_tabs.GetIdxFromWindow(close_wnd)); e.SetOldSelection(evt.GetSelection()); e.SetEventObject(this); - GetEventHandler()->ProcessEvent(e); + GetParent()->GetEventHandler()->ProcessEvent(e); if (!e.IsAllowed()) return;