X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..aa99e0cd2242db04fe1f9bb7d91aea545def2422:/src/common/bookctrl.cpp diff --git a/src/common/bookctrl.cpp b/src/common/bookctrl.cpp index 9202c46db0..508befd1bc 100644 --- a/src/common/bookctrl.cpp +++ b/src/common/bookctrl.cpp @@ -6,7 +6,7 @@ // Created: 19.08.03 // RCS-ID: $Id$ // Copyright: (c) 2003 Vadim Zeitlin -// Licence: wxWidgets licence +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -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; }