]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/dialog.cpp
Add wxDataViewModel::ChangeValue() and use it in wxDVC implementation.
[wxWidgets.git] / src / osx / carbon / dialog.cpp
index 16a77b7ce23919e540b0f9a8a0d34ba07fd86b35..9924b54b06028dce197d051d1bf270542c30ac55 100644 (file)
@@ -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();