]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed Fit() to call SetClientSize() and not SetSize()
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 17 Oct 2005 22:41:52 +0000 (22:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 17 Oct 2005 22:41:52 +0000 (22:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/common/wincmn.cpp

index 1c5fc8e5f3ada313fba717d3948863dec83c90f5..bc0609bfac74ccfebcceb3ae18c1cff32d265b57 100644 (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:
 
index 5e7143c74a9a7600aff72191fbee1671a89b7ebe..7a1e6e85774ce0cc5cae664560bb279b1ac936e1 100644 (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
 }