X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb4d5ecdc54138441460461dc32a8738911a96b7..82baa5e4f1992b701e183544c935bcb424503f5b:/src/msw/printwin.cpp diff --git a/src/msw/printwin.cpp b/src/msw/printwin.cpp index 64c0572ac5..bc72876edd 100644 --- a/src/msw/printwin.cpp +++ b/src/msw/printwin.cpp @@ -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);