X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a219792590b1817eb03dd27ca99b12d42c321465..53c43278a9d71e15f43cbe359abea50d3775d8ad:/src/osx/carbon/dialog.cpp diff --git a/src/osx/carbon/dialog.cpp b/src/osx/carbon/dialog.cpp index 16a77b7ce2..84dbc61448 100644 --- a/src/osx/carbon/dialog.cpp +++ b/src/osx/carbon/dialog.cpp @@ -41,9 +41,12 @@ void wxDialog::DoShowModal() if ( GetParent() == NULL ) { windowGroup = GetWindowGroup(windowRef) ; - formerParentGroup = GetWindowGroupParent( windowGroup ); - SetWindowGroupParent( windowGroup, GetWindowGroupOfClass( kMovableModalWindowClass ) ); - resetGroupParent = true; + if ( windowGroup != GetWindowGroupOfClass( kMovableModalWindowClass ) ) + { + formerParentGroup = GetWindowGroupParent( windowGroup ); + SetWindowGroupParent( windowGroup, GetWindowGroupOfClass( kMovableModalWindowClass ) ); + resetGroupParent = true; + } } BeginAppModalStateForWindow(windowRef) ;