]> git.saurik.com Git - wxWidgets.git/commitdiff
fixing modal dialog quit after nested message box problem
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 10 Jun 2009 05:04:58 +0000 (05:04 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 10 Jun 2009 05:04:58 +0000 (05:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/dialog.mm

index e5a9d3f6581691fa11e581505cc257617282ea2c..b195a8633490fa9f3a58818929a6141bb5a4d3e4 100644 (file)
@@ -47,12 +47,15 @@ void wxDialog::DoShowModal()
     NSWindow* theWindow = GetWXWindow();
     
     NSModalSession session = [NSApp beginModalSessionForWindow:theWindow];
+    int response = 0;
     while (IsModal()) 
     {
         wxMacAutoreleasePool autoreleasepool;
-        if ([NSApp runModalSession:session] != NSRunContinuesResponse)
-            break;
-        // TODO should we do some idle processing ?
+        // we cannot break based on the return value, because nested
+        // alerts might set this to stopped as well, so it would be
+        // unsafe
+        [NSApp runModalSession:session];
+        // TODO Idle
     }
     [NSApp endModalSession:session];