X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0335f6f746068090e7877bc556bbb5d6f184991e..414dfb5804fc568b26fec3f8a8ecc2f25addedfd:/src/common/bookctrl.cpp?ds=sidebyside diff --git a/src/common/bookctrl.cpp b/src/common/bookctrl.cpp index 553ee11ffd..4a4617b51a 100644 --- a/src/common/bookctrl.cpp +++ b/src/common/bookctrl.cpp @@ -46,10 +46,6 @@ void wxBookCtrl::Init() { m_imageList = NULL; m_ownsImageList = false; - // Unlike most controls, we don't want to adjust the min size - // when we set the font, since the page size is not related to - // the font size. - m_adjustMinSize = false; } bool @@ -134,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; } // ---------------------------------------------------------------------------- @@ -153,6 +151,7 @@ wxBookCtrl::InsertPage(size_t nPage, _T("invalid page index in wxBookCtrl::InsertPage()") ); m_pages.Insert(page, nPage); + InvalidateBestSize(); return true; } @@ -175,6 +174,7 @@ wxWindow *wxBookCtrl::DoRemovePage(size_t nPage) wxWindow *pageRemoved = m_pages[nPage]; m_pages.RemoveAt(nPage); + InvalidateBestSize(); return pageRemoved; }