replaced Yield with YieldIfNeeded for Mac
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 21 Apr 2004 07:04:32 +0000 (07:04 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 21 Apr 2004 07:04:32 +0000 (07:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/progdlgg.cpp

index fa6c17e78886e607a0a6a435c04a2d819d7f75d6..2efd26e2a392a23833d9b6625dab99a6ea454bea 100644 (file)
@@ -266,11 +266,11 @@ wxProgressDialog::wxProgressDialog(wxString const &title,
         SetTimeLabel(0, m_elapsed);
     }
 
-    // Update the display (especially on X, GTK)
-    wxYield();
-
 #ifdef __WXMAC__
     Update();
+#else
+    // Update the display (especially on X, GTK)
+    wxYield();
 #endif
 }
 
@@ -331,7 +331,11 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
     {
         m_msg->SetLabel(newmsg);
 
+#ifdef __WXMAC__
+        wxYieldIfNeeded() ;
+#else
         wxYield();
+#endif
     }
 
     if ( (m_elapsed || m_remaining || m_estimated) && (value != 0) )
@@ -370,7 +374,11 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
                 m_msg->SetLabel(_("Done."));
             }
 
+#ifdef __WXMAC__
+            wxYieldIfNeeded() ;
+#else
             wxYield();
+#endif
 
             (void)ShowModal();
         }
@@ -387,7 +395,11 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
     else
     {
         // update the display
+#ifdef __WXMAC__
+        wxYieldIfNeeded() ;
+#else
         wxYield();
+#endif
     }
 
 #ifdef __WXMAC__