]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/dialog.cpp
linking fix for wxUSE_VALIDATORS==0
[wxWidgets.git] / src / osx / carbon / dialog.cpp
index 16a77b7ce23919e540b0f9a8a0d34ba07fd86b35..84dbc61448b604236c2d04bde28cd9a9e0a3b7aa 100644 (file)
@@ -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) ;