]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't call SetMinSize() when creating the window if no initial size was given.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 27 Dec 2009 19:40:28 +0000 (19:40 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 27 Dec 2009 19:40:28 +0000 (19:40 +0000)
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

src/common/wincmn.cpp

index 27a560c9b9e6953200998a08b20353b4f082c2ec..847f6dec9fa146bda98e054bbaacd41d3887ae60 100644 (file)
@@ -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);