X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/447325a44f93b92bb1be54542085ddd6875dfff8..2e334012b4babcf063fbe79540c4c154cd54ab2b:/src/generic/listbkg.cpp diff --git a/src/generic/listbkg.cpp b/src/generic/listbkg.cpp index ec18b7eb32..2bfb0b4d09 100644 --- a/src/generic/listbkg.cpp +++ b/src/generic/listbkg.cpp @@ -50,10 +50,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxListbook, wxBookCtrlBase) IMPLEMENT_DYNAMIC_CLASS(wxListbookEvent, wxNotifyEvent) -#if !WXWIN_COMPATIBILITY_EVENT_TYPES const wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING = wxNewEventType(); const wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED = wxNewEventType(); -#endif BEGIN_EVENT_TABLE(wxListbook, wxBookCtrlBase) EVT_SIZE(wxListbook::OnSize) @@ -324,13 +322,9 @@ wxListbook::InsertPage(size_t n, if ( selNew != -1 ) SetSelection(selNew); - GetListView()->Arrange(); - - if (GetPageCount() == 1) - { - wxSizeEvent sz(GetSize(), GetId()); - ProcessEvent(sz); - } + wxSizeEvent sz(GetSize(), GetId()); + GetEventHandler()->ProcessEvent(sz); + return true; } @@ -363,7 +357,7 @@ wxWindow *wxListbook::DoRemovePage(size_t page) if (GetPageCount() == 0) { wxSizeEvent sz(GetSize(), GetId()); - ProcessEvent(sz); + GetEventHandler()->ProcessEvent(sz); } } @@ -380,7 +374,7 @@ bool wxListbook::DeleteAllPages() m_selection = -1; wxSizeEvent sz(GetSize(), GetId()); - ProcessEvent(sz); + GetEventHandler()->ProcessEvent(sz); return true; }