X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1169a91932273bc84c23ed9dbd0a2da064d59d66..8ae4f08661d7b324d5cd7aa16ab1a7b2810d94f2:/src/common/bookctrl.cpp diff --git a/src/common/bookctrl.cpp b/src/common/bookctrl.cpp index 25d28d865d..508befd1bc 100644 --- a/src/common/bookctrl.cpp +++ b/src/common/bookctrl.cpp @@ -42,23 +42,6 @@ // constructors and destructors // ---------------------------------------------------------------------------- -wxBookCtrl::wxBookCtrl() -{ - Init(); -} - -wxBookCtrl::wxBookCtrl(wxWindow *parent, - wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - Init(); - - (void)Create(parent, id, pos, size, style, name); -} - void wxBookCtrl::Init() { m_imageList = NULL; @@ -147,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; } // ---------------------------------------------------------------------------- @@ -166,7 +151,8 @@ wxBookCtrl::InsertPage(size_t nPage, _T("invalid page index in wxBookCtrl::InsertPage()") ); m_pages.Insert(page, nPage); - + InvalidateBestSize(); + return true; } @@ -188,6 +174,7 @@ wxWindow *wxBookCtrl::DoRemovePage(size_t nPage) wxWindow *pageRemoved = m_pages[nPage]; m_pages.RemoveAt(nPage); + InvalidateBestSize(); return pageRemoved; }