diff --git a/docs/changes.txt b/docs/changes.txt index 2b3971365f..25d36877e0 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -51,6 +51,8 @@ Changes in behaviour not resulting in compilation errors consistency with the other ports. You now need to call SetMargins(0, 0) explicitly if you really don't want to have any margins in your buttons. +- wxEVT_AUINOTEBOOK_PAGE_CHANGED event is now sent after changing the page, + as expected, and not before doing it. Changes in behaviour which may result in build errors ----------------------------------------------------- diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index ae8ae603d0..f1298c9997 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -3423,14 +3423,6 @@ int wxAuiNotebook::DoModifySelection(size_t n, bool events) int old_curpage = m_curPage; m_curPage = n; - // program allows the page change - if(events) - { - evt.SetEventType(wxEVT_AUINOTEBOOK_PAGE_CHANGED); - (void)GetEventHandler()->ProcessEvent(evt); - } - - wxAuiTabCtrl* ctrl; int ctrl_idx; if (FindTab(wnd, &ctrl, &ctrl_idx)) @@ -3464,6 +3456,13 @@ int wxAuiNotebook::DoModifySelection(size_t n, bool events) if (wnd->IsShownOnScreen() && FindFocus() != ctrl) wnd->SetFocus(); + // program allows the page change + if(events) + { + evt.SetEventType(wxEVT_AUINOTEBOOK_PAGE_CHANGED); + (void)GetEventHandler()->ProcessEvent(evt); + } + return old_curpage; } }