Use wxSize::IncTo() in wxBookCtrlBase::DoGetBestSize().
No changes, just use an existing wxSize method instead of reimplementing it in the loop over the pages in wxBookCtrlBase. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -148,16 +148,8 @@ wxSize wxBookCtrlBase::DoGetBestSize() const
|
||||
for ( size_t nPage = 0; nPage < nCount; nPage++ )
|
||||
{
|
||||
const wxWindow * const pPage = m_pages[nPage];
|
||||
if( pPage )
|
||||
{
|
||||
wxSize childBestSize(pPage->GetBestSize());
|
||||
|
||||
if ( childBestSize.x > bestSize.x )
|
||||
bestSize.x = childBestSize.x;
|
||||
|
||||
if ( childBestSize.y > bestSize.y )
|
||||
bestSize.y = childBestSize.y;
|
||||
}
|
||||
if ( pPage )
|
||||
bestSize.IncTo(pPage->GetBestSize());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user