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:
parent
3c81c9aafb
commit
5a63a0f10a
@ -158,8 +158,9 @@ void wxTopLevelWindowBase::DoCentre(int dir)
|
|||||||
wxRect rectCentre;
|
wxRect rectCentre;
|
||||||
if ( !(dir & wxCENTRE_ON_SCREEN) && GetParent() )
|
if ( !(dir & wxCENTRE_ON_SCREEN) && GetParent() )
|
||||||
{
|
{
|
||||||
// centre on parent window
|
// centre on parent window: notice that we need screen coordinates for
|
||||||
rectCentre = GetParent()->GetRect();
|
// positioning this TLW
|
||||||
|
rectCentre = GetParent()->GetScreenRect();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user