X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9482c64466359ec7cfd201bebc3399ac4a56b4e6..78a17075019ea5bed5085d3afeb822c47d77a82c:/src/osx/cocoa/dialog.mm

diff --git a/src/osx/cocoa/dialog.mm b/src/osx/cocoa/dialog.mm
index 8976d677f5..d55449d1b5 100644
--- a/src/osx/cocoa/dialog.mm
+++ b/src/osx/cocoa/dialog.mm
@@ -24,7 +24,7 @@
 
 extern wxList wxModalDialogs;
 
-void wxDialog::ShowWindowModal()
+void wxDialog::DoShowWindowModal()
 {   
     wxTopLevelWindow* parent = static_cast<wxTopLevelWindow*>(wxGetTopLevelParent(GetParent()));
     
@@ -33,8 +33,6 @@ void wxDialog::ShowWindowModal()
     NSWindow* parentWindow = parent->GetWXWindow();
     NSWindow* theWindow = GetWXWindow();
     
-    wxASSERT_MSG([theWindow styleMask] & NSDocModalWindowMask, "Window must have DocModal mask set.");
-
     [NSApp beginSheet: theWindow
             modalForWindow: parentWindow
             modalDelegate: theWindow
@@ -45,12 +43,11 @@ void wxDialog::ShowWindowModal()
 void wxDialog::EndWindowModal()
 {
     [NSApp endSheet: GetWXWindow()];
+    [GetWXWindow() orderOut:GetWXWindow()];
 }
 
 void wxDialog::DoShowModal()
 {
-    wxCHECK_RET( !IsModal(), wxT("DoShowModal() called twice") );
-
     // If the app hasn't started, flush the event queue
     // If we don't do this, the Dock doesn't get the message that
     // the app has started so will refuse to activate it.
@@ -64,8 +61,6 @@ void wxDialog::DoShowModal()
         }
     }
 
-    wxModalDialogs.Append(this);
-
     SetFocus() ;
 /*
     WindowGroupRef windowGroup;