]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
no message
[wxWidgets.git] / src / common / wincmn.cpp
index 4df298217edc9cdbc1047a2cc682099801853f29..01532a8bfb3bde1dce6ef27251205ae161111abe 100644 (file)
@@ -403,6 +403,14 @@ wxSize wxWindowBase::DoGetBestSize() const
 
             int wx, wy, ww, wh;
             win->GetPosition(&wx, &wy);
+
+            // if the window hadn't been positioned yet, assume that it is in
+            // the origin
+            if ( wx == -1 )
+                wx = 0;
+            if ( wy == -1 )
+                wy = 0;
+
             win->GetSize(&ww, &wh);
             if ( wx + ww > maxX )
                 maxX = wx + ww;