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:
parent
871192ce0f
commit
74205969dd
@ -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:
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user