use wxBusyCursor class instead of wxBeginBusyCursor and several (mismatched and thus provoking assert failures) wxEndCursors

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-02-08 13:30:23 +00:00
parent 590e21b0e2
commit 0f07e3dc24

View File

@@ -167,7 +167,7 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt
printout->SetPageSizeMM((int)w, (int)h);
// Create an abort window
wxBeginBusyCursor();
wxBusyCursor busyCursor;
printout->OnPreparePrinting();
@@ -179,7 +179,6 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt
if (maxPage == 0)
{
sm_lastError = wxPRINTER_ERROR;
wxEndBusyCursor();
return false;
}
@@ -212,7 +211,6 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt
if (!win)
{
wxEndBusyCursor();
wxLogDebug(wxT("Could not create an abort dialog."));
sm_lastError = wxPRINTER_ERROR;
@@ -241,7 +239,6 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt
{
if ( !printout->OnBeginDocument(minPageNum, maxPageNum) )
{
wxEndBusyCursor();
wxLogError(_("Could not start printing."));
sm_lastError = wxPRINTER_ERROR;
break;
@@ -287,8 +284,6 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt
sm_abortWindow = NULL;
}
wxEndBusyCursor();
delete dc;
return (sm_lastError == wxPRINTER_NO_ERROR);