Don't reserve space for hidden controller in wxBookCtrl.
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
This commit is contained in:
parent
5995a84fcf
commit
448ca22809
@ -311,7 +311,10 @@ void wxBookCtrlBase::OnSize(wxSizeEvent& event)
|
||||
|
||||
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(),
|
||||
|
Loading…
Reference in New Issue
Block a user