X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/65ba4113c63f5ad60aa6bb49a70cf893d1d175a3..c97e7fa8dbda704c9c9cdb61c22ebdf9b692e114:/src/common/sizer.cpp diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index fd78077c09..b3736d1754 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -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 ); }