]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/bookctrl.cpp
wxMac uses wxStandardPathsCF to mean wxStandardPaths in its wxBase
[wxWidgets.git] / src / common / bookctrl.cpp
index cdd90bf2e04df33f9befc60633a25c1528e4c2b3..4a4617b51a783524c184ac4bfdd991dd8d63d6ea 100644 (file)
@@ -130,7 +130,9 @@ wxSize wxBookCtrl::DoGetBestSize() const
 
     // convert display area to window area, adding the size neccessary for the
     // tabs
-    return CalcSizeFromPage(bestSize);
+    wxSize best = CalcSizeFromPage(bestSize);
+    CacheBestSize(best);
+    return best;
 }
 
 // ----------------------------------------------------------------------------
@@ -140,15 +142,16 @@ wxSize wxBookCtrl::DoGetBestSize() const
 bool
 wxBookCtrl::InsertPage(size_t nPage,
                        wxWindow *page,
-                       const wxString& text,
-                       bool bSelect,
-                       int imageId)
+                       const wxString& WXUNUSED(text),
+                       bool WXUNUSED(bSelect),
+                       int WXUNUSED(imageId))
 {
     wxCHECK_MSG( page, false, _T("NULL page in wxBookCtrl::InsertPage()") );
     wxCHECK_MSG( nPage <= m_pages.size(), false,
                  _T("invalid page index in wxBookCtrl::InsertPage()") );
 
     m_pages.Insert(page, nPage);
+    InvalidateBestSize();
 
     return true;
 }
@@ -171,6 +174,7 @@ wxWindow *wxBookCtrl::DoRemovePage(size_t nPage)
 
     wxWindow *pageRemoved = m_pages[nPage];
     m_pages.RemoveAt(nPage);
+    InvalidateBestSize();
 
     return pageRemoved;
 }