X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/233387bdcbb1c4f31c54b0fe6b3f03e8d261cab1..40319aa0ce7d201ae25554bb7a6ea3257e41a904:/src/common/bookctrl.cpp diff --git a/src/common/bookctrl.cpp b/src/common/bookctrl.cpp index 63f34b0d7b..f22559cb98 100644 --- a/src/common/bookctrl.cpp +++ b/src/common/bookctrl.cpp @@ -53,6 +53,7 @@ void wxBookCtrlBase::Init() m_bookctrl = NULL; m_imageList = NULL; m_ownsImageList = false; + m_fitToCurrentPage = false; #if defined(__WXWINCE__) m_internalBorder = 1; @@ -143,6 +144,9 @@ wxSize wxBookCtrlBase::DoGetBestSize() const bestSize.y = childBestSize.y; } } + + if (m_fitToCurrentPage && GetCurrentPage()) + bestSize = GetCurrentPage()->GetBestSize(); // convert display area to window area, adding the size necessary for the // tabs