]> git.saurik.com Git - wxWidgets.git/commitdiff
avoid calling GetDefaultSize() twice
authorPaul Cornett <paulcor@bullseye.com>
Tue, 24 Sep 2013 05:50:09 +0000 (05:50 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Tue, 24 Sep 2013 05:50:09 +0000 (05:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/toplevel.cpp

index 9e2a4176f94abb4481ce305c98b401e63459592a..66da4cb24698c8c18a2d7f6c7b93d1e8397ad899 100644 (file)
@@ -549,7 +549,9 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
                                   long style,
                                   const wxString &name )
 {
-    const wxSize size(WidthDefault(sizeOrig.x), HeightDefault(sizeOrig.y));
+    wxSize size(sizeOrig);
+    if (!size.IsFullySpecified())
+        size.SetDefaults(GetDefaultSize());
 
     wxTopLevelWindows.Append( this );