]> git.saurik.com Git - wxWidgets.git/commitdiff
Changed ::Fit() to only fit the sizer if the window is the top level window
authorGeorge Tasker <gtasker@allenbrook.com>
Thu, 26 Apr 2001 01:08:19 +0000 (01:08 +0000)
committerGeorge Tasker <gtasker@allenbrook.com>
Thu, 26 Apr 2001 01:08:19 +0000 (01:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/sizer.cpp

index fd78077c09f23b7f6d4d22b5bde7711ab8bd9942..b3736d1754b474b81e5d8c2a8a00b007cab7e733 100644 (file)
@@ -355,7 +355,12 @@ bool wxSizer::Remove( int pos )
 
 void wxSizer::Fit( wxWindow *window )
 {
-    wxSize size = FitSize( window );
+    wxSize size;
+    if (window->IsTopLevel())
+        size = FitSize( window );
+    else
+        size = GetMinWindowSize( window );
+
     window->SetSize( size );
 }