fixed Fit() to call SetClientSize() and not SetSize()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-10-17 22:41:52 +00:00
parent 871192ce0f
commit 74205969dd
2 changed files with 3 additions and 2 deletions

View File

@ -15,6 +15,7 @@ All (GUI):
- added wxDialog::SetEscapeId()
- wxItemContainerImmutable::FindString unified (affects wxRadioBox, wxListBox,
wxComboBox and wxChoice)
- wxWindow::Fit() now works correctly for frames and dialogs too
wxMSW:

View File

@ -528,9 +528,9 @@ void wxWindowBase::Centre(int direction)
// fits the window around the children
void wxWindowBase::Fit()
{
if ( GetChildren().GetCount() > 0 )
if ( !GetChildren().empty() )
{
SetSize(GetBestSize());
SetClientSize(GetBestSize());
}
//else: do nothing if we have no children
}