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:
@@ -15,6 +15,7 @@ All (GUI):
|
|||||||
- added wxDialog::SetEscapeId()
|
- added wxDialog::SetEscapeId()
|
||||||
- wxItemContainerImmutable::FindString unified (affects wxRadioBox, wxListBox,
|
- wxItemContainerImmutable::FindString unified (affects wxRadioBox, wxListBox,
|
||||||
wxComboBox and wxChoice)
|
wxComboBox and wxChoice)
|
||||||
|
- wxWindow::Fit() now works correctly for frames and dialogs too
|
||||||
|
|
||||||
wxMSW:
|
wxMSW:
|
||||||
|
|
||||||
|
@@ -528,9 +528,9 @@ void wxWindowBase::Centre(int direction)
|
|||||||
// fits the window around the children
|
// fits the window around the children
|
||||||
void wxWindowBase::Fit()
|
void wxWindowBase::Fit()
|
||||||
{
|
{
|
||||||
if ( GetChildren().GetCount() > 0 )
|
if ( !GetChildren().empty() )
|
||||||
{
|
{
|
||||||
SetSize(GetBestSize());
|
SetClientSize(GetBestSize());
|
||||||
}
|
}
|
||||||
//else: do nothing if we have no children
|
//else: do nothing if we have no children
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user