X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2f1ae4143271ae63a17e052a1a471d16e9cd8c44..f21b2fd89d02837dfd0d195f8ff0f3f5640af017:/src/mac/carbon/dialog.cpp?ds=inline

diff --git a/src/mac/carbon/dialog.cpp b/src/mac/carbon/dialog.cpp
index 760c07680a..044002d970 100644
--- a/src/mac/carbon/dialog.cpp
+++ b/src/mac/carbon/dialog.cpp
@@ -215,6 +215,7 @@ void wxDialog::DoShowModal()
     }
 	// TODO : test whether parent gets disabled
 
+	bool formerModal = s_macIsInModalLoop ;
 	s_macIsInModalLoop = true ;
 
 	while ( IsModalShowing() )
@@ -225,7 +226,7 @@ void wxDialog::DoShowModal()
 		wxTheApp->MacDoOneEvent() ;
 	}
 	
-	s_macIsInModalLoop = false ;
+	s_macIsInModalLoop = formerModal ;
 
     // TODO probably reenable the parent window if any