Ensure we don't reset the group parent if it wasn't set at the begining
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -148,11 +148,14 @@ void wxDialog::DoShowModal()
|
||||
WindowRef windowRef = (WindowRef) MacGetWindowRef();
|
||||
WindowGroupRef windowGroup;
|
||||
WindowGroupRef formerParentGroup;
|
||||
bool resetGroupParent = false;
|
||||
|
||||
if ( GetParent() == NULL )
|
||||
{
|
||||
windowGroup = GetWindowGroup(windowRef) ;
|
||||
formerParentGroup = GetWindowGroupParent( windowGroup );
|
||||
SetWindowGroupParent( windowGroup, GetWindowGroupOfClass( kMovableModalWindowClass ) );
|
||||
resetGroupParent = true;
|
||||
}
|
||||
BeginAppModalStateForWindow(windowRef) ;
|
||||
|
||||
@@ -163,7 +166,7 @@ void wxDialog::DoShowModal()
|
||||
}
|
||||
|
||||
EndAppModalStateForWindow(windowRef) ;
|
||||
if ( GetParent() == NULL )
|
||||
if ( resetGroupParent )
|
||||
{
|
||||
SetWindowGroupParent( windowGroup , formerParentGroup );
|
||||
}
|
||||
|
Reference in New Issue
Block a user