X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1f0c8f31f407ecfce909060464c0ea655221cdab..ef6ece2352e739f843d9fc08d96d46b6467b83d6:/src/osx/carbon/dialog.cpp?ds=sidebyside diff --git a/src/osx/carbon/dialog.cpp b/src/osx/carbon/dialog.cpp index 19dbf02e88..c97b487fb6 100644 --- a/src/osx/carbon/dialog.cpp +++ b/src/osx/carbon/dialog.cpp @@ -62,7 +62,7 @@ void wxDialog::SetModal( bool flag ) { m_isModalStyle = true; - SetWindowModality( (WindowRef)MacGetWindowRef(), kWindowModalityAppModal, NULL ) ; + SetWindowModality( (WindowRef)GetWXWindow(), kWindowModalityAppModal, NULL ) ; } else { @@ -135,7 +135,7 @@ void wxDialog::DoShowModal() SetFocus() ; - WindowRef windowRef = (WindowRef) MacGetWindowRef(); + WindowRef windowRef = (WindowRef) GetWXWindow(); WindowGroupRef windowGroup; WindowGroupRef formerParentGroup; bool resetGroupParent = false; @@ -169,7 +169,10 @@ int wxDialog::ShowModal() if ( !m_isModalStyle ) SetModal(true); - Show(true); + if ( IsShown() ) + DoShowModal(); + else + Show(true); return GetReturnCode(); }