X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc699de848bcead97528901420ee975df1b9442a..38534f596974042130716a26276e9564b0b72295:/include/wx/simplebook.h?ds=sidebyside diff --git a/include/wx/simplebook.h b/include/wx/simplebook.h index e99f44d370..795391466c 100644 --- a/include/wx/simplebook.h +++ b/include/wx/simplebook.h @@ -145,19 +145,26 @@ protected: virtual wxBookCtrlEvent* CreatePageChangingEvent() const { - return new wxBookCtrlEvent(wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING, + return new wxBookCtrlEvent(wxEVT_BOOKCTRL_PAGE_CHANGING, GetId()); } virtual void MakeChangedEvent(wxBookCtrlEvent& event) { - event.SetEventType(wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED); + event.SetEventType(wxEVT_BOOKCTRL_PAGE_CHANGED); } virtual wxWindow *DoRemovePage(size_t page) { - m_pageTexts.erase(m_pageTexts.begin() + page); - return wxBookCtrlBase::DoRemovePage(page); + wxWindow* const win = wxBookCtrlBase::DoRemovePage(page); + if ( win ) + { + m_pageTexts.erase(m_pageTexts.begin() + page); + + DoSetSelectionAfterRemoval(page); + } + + return win; } virtual void DoSize()