X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/489468feaa08b8f504735eecca522fb8d0f825d2..ef6ece2352e739f843d9fc08d96d46b6467b83d6:/src/osx/carbon/dialog.cpp diff --git a/src/osx/carbon/dialog.cpp b/src/osx/carbon/dialog.cpp index 8743e10547..c97b487fb6 100644 --- a/src/osx/carbon/dialog.cpp +++ b/src/osx/carbon/dialog.cpp @@ -20,7 +20,7 @@ #include "wx/settings.h" #endif // WX_PRECOMP -#include "wx/mac/uma.h" +#include "wx/osx/uma.h" // Lists to keep track of windows, so we can disable/enable them @@ -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(); }