X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/15aad3b9386e52524eefbd2619571a038070419b..e0176dd9fb716ad0a1a8804f0a93e16048f09054:/src/common/bookctrl.cpp?ds=sidebyside diff --git a/src/common/bookctrl.cpp b/src/common/bookctrl.cpp index d083152210..bf8a833434 100644 --- a/src/common/bookctrl.cpp +++ b/src/common/bookctrl.cpp @@ -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,12 +142,12 @@ 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, + wxCHECK_MSG( nPage <= m_pages.size(), false, _T("invalid page index in wxBookCtrl::InsertPage()") ); m_pages.Insert(page, nPage);