replaced Yield with YieldIfNeeded for Mac

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2004-04-21 07:04:32 +00:00
parent 6548fabe00
commit 822fc380b8

View File

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