]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listbkg.cpp
wxSizer::Fit() now sets client size
[wxWidgets.git] / src / generic / listbkg.cpp
index eae7c13d3ca20aeb952ae650550c3d2911ac8426..2bfb0b4d09abf7e99766c87a6c9b4a78901e0c09 100644 (file)
 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());
-        GetEventHandler()->ProcessEvent(sz);
-    }
+    wxSizeEvent sz(GetSize(), GetId());
+    GetEventHandler()->ProcessEvent(sz);
+    
     return true;
 }