Even when the controller was hidden, space was still allocated for it by
wxBookCtrl. Fix this by only reserving extra space when the controller is
shown.
Closes #12609.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65894
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxSize wxBookCtrlBase::GetControllerSize() const
{
- if ( !m_bookctrl )
+ // For at least some book controls (e.g. wxChoicebook) it may make sense to
+ // (temporarily?) hide the controller and we shouldn't leave extra space
+ // for the hidden control in this case.
+ if ( !m_bookctrl || !m_bookctrl->IsShown() )
return wxSize(0, 0);
const wxSize sizeClient = GetClientSize(),