X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a219792590b1817eb03dd27ca99b12d42c321465..aa926768a9329b4eb4804c89de8da2061549708d:/src/osx/carbon/dialog.cpp diff --git a/src/osx/carbon/dialog.cpp b/src/osx/carbon/dialog.cpp index 16a77b7ce2..9924b54b06 100644 --- a/src/osx/carbon/dialog.cpp +++ b/src/osx/carbon/dialog.cpp @@ -41,13 +41,18 @@ 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) ; +#if wxUSE_CONSOLE_EVENTLOOP wxEventLoopGuarantor ensureHasLoop; +#endif wxEventLoopBase * const loop = wxEventLoop::GetActive(); while ( IsModal() ) loop->Dispatch();