X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f44af1dc9e60397a45dfe661d4db0484f59c798e..78a17075019ea5bed5085d3afeb822c47d77a82c:/src/osx/cocoa/dialog.mm diff --git a/src/osx/cocoa/dialog.mm b/src/osx/cocoa/dialog.mm index 47a50ba404..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(wxGetTopLevelParent(GetParent())); @@ -32,8 +32,6 @@ void wxDialog::ShowWindowModal() NSWindow* parentWindow = parent->GetWXWindow(); NSWindow* theWindow = GetWXWindow(); - - wxWindow::Show(true); [NSApp beginSheet: theWindow modalForWindow: parentWindow @@ -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;