From: Karsten Ballüder Date: Mon, 21 Jun 1999 14:11:45 +0000 (+0000) Subject: fixes to progressdialog and its use in printing framework X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ffdaed2fc3b8b30bdea60dd27ed839c0957891b4 fixes to progressdialog and its use in printing framework git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/printps.cpp b/src/generic/printps.cpp index 5cb8272a26..be4cbae7b6 100644 --- a/src/generic/printps.cpp +++ b/src/generic/printps.cpp @@ -178,7 +178,8 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro printout->GetTitle(), _("Printing..."), totalPages, - parent ); + parent, + wxPD_CAN_ABORT|wxPD_AUTO_HIDE|wxPD_APP_MODAL); printout->OnBeginPrinting(); diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index b3b74cc634..b4bd92686f 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -131,7 +131,6 @@ wxProgressDialog::Update(int value, const wxString& newmsg) m_gauge->SetValue(value + 1); if( !newmsg.IsEmpty() ) m_msg->SetLabel(newmsg); - wxYield(); if ( (value == m_maximum - 1) && !(GetWindowStyleFlag() & wxPD_AUTO_HIDE) ) { @@ -148,9 +147,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg) } m_state = Finished; - while ( m_state != Canceled ) // set from OnClose() - wxYield(); - + // so that we return TRUE below m_state = Finished; }