fix for -1 coords in wxWindow::Centre
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -393,8 +393,9 @@ void wxWindowBase::Centre(int direction)
|
|||||||
xNew += posParent.x;
|
xNew += posParent.x;
|
||||||
yNew += posParent.y;
|
yNew += posParent.y;
|
||||||
|
|
||||||
// move the centre of this window to this position
|
// move the window to this position (keeping the old size but using
|
||||||
Move(xNew, yNew);
|
// SetSize() and not Move() to allow xNew and/or yNew to be -1)
|
||||||
|
SetSize(xNew, yNew, -1, -1, wxSIZE_ALLOW_MINUS_ONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// fits the window around the children
|
// fits the window around the children
|
||||||
|
Reference in New Issue
Block a user