]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sizer.cpp
return the index of the inserted/appended item
[wxWidgets.git] / src / common / sizer.cpp
index e121731de814863e0a75c781f9a4f726776b268f..71ed6cb4b6e59462632f51f25f3f5b7f087b0286 100644 (file)
@@ -563,13 +563,10 @@ void wxSizer::DeleteWindows()
 
 wxSize wxSizer::Fit( wxWindow *window )
 {
-    wxSize size;
-    if (window->IsTopLevel())
-        size = FitSize( window );
-    else
-        size = GetMinWindowSize( window );
+    wxSize size(window->IsTopLevel() ? FitSize(window)
+                                     : GetMinWindowSize(window));
 
-    window->SetSize( size );
+    window->SetClientSize( size );
 
     return size;
 }