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
This commit is contained in:
Vadim Zeitlin 2009-12-27 19:40:28 +00:00
parent 7b9cb2d1ef
commit 653351d1cc

View 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);