X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..b6a20a20d010d643e52914f51aa0700df0da925f:/src/common/bookctrl.cpp diff --git a/src/common/bookctrl.cpp b/src/common/bookctrl.cpp index b04136183e..508befd1bc 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; } // ---------------------------------------------------------------------------- @@ -149,7 +151,8 @@ wxBookCtrl::InsertPage(size_t nPage, _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; }