From: Vadim Zeitlin Date: Sun, 27 Dec 2009 19:40:28 +0000 (+0000) Subject: Don't call SetMinSize() when creating the window if no initial size was given. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/653351d1cc29b3746ff4a14975a7f95141867d72 Don't call SetMinSize() when creating the window if no initial size was given. Calling SetMinSize() is unnecessary in this case. It also results in GTK+ errors when creating wxFileDialog as it is not created yet when this is called (but it does take care to pass wxDefaultSize to this function as its size can't be set yet). See r62814 and r62817. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 27a560c9b9..847f6dec9f 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -245,7 +245,7 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent, // does not as the user should be able to resize the window) // // note that we can't use IsTopLevel() from ctor - if ( !wxTopLevelWindows.Find((wxWindow *)this) ) + if ( size != wxDefaultSize && !wxTopLevelWindows.Find((wxWindow *)this) ) SetMinSize(size); SetName(name);