fixed centering of a TLW on a non-TLW parent

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2006-03-14 15:59:32 +00:00
parent 3c81c9aafb
commit 5a63a0f10a

View File

@ -158,8 +158,9 @@ void wxTopLevelWindowBase::DoCentre(int dir)
wxRect rectCentre;
if ( !(dir & wxCENTRE_ON_SCREEN) && GetParent() )
{
// centre on parent window
rectCentre = GetParent()->GetRect();
// centre on parent window: notice that we need screen coordinates for
// positioning this TLW
rectCentre = GetParent()->GetScreenRect();
}
else
{