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();