diff --git a/src/qt/window.cpp b/src/qt/window.cpp index 76c3ec29be..74a3c91fa6 100644 --- a/src/qt/window.cpp +++ b/src/qt/window.cpp @@ -227,7 +227,11 @@ bool wxWindowQt::Create( wxWindowQt * parent, wxWindowID id, const wxPoint & pos parent->AddChild( this ); - DoMoveWindow( pos.x, pos.y, size.GetWidth(), size.GetHeight() ); + wxPoint p; + if(pos != wxDefaultPosition) + p = pos; + + DoMoveWindow( p.x, p.y, size.GetWidth(), size.GetHeight() ); PostCreation(); @@ -808,6 +812,14 @@ void wxWindowQt::DoSetSize(int x, int y, int width, int height, int sizeFlags ) if ( height == wxDefaultCoord && ( sizeFlags & wxSIZE_AUTO_HEIGHT )) height = BEST_SIZE.y; } + + int w, h; + GetSize(&w, &h); + if (width == -1) + width = w; + if (height == -1) + height = h; + DoMoveWindow( x, y, width, height ); }