X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e41e579f40ec15c8c20aa3118b7367281ae4f95b..9f7948af90ec2e3b907944e7d979f0863910c5c8:/src/msw/printwin.cpp diff --git a/src/msw/printwin.cpp b/src/msw/printwin.cpp index f2208d9207..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; @@ -229,11 +227,6 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt int minPageNum = minPage, maxPageNum = maxPage; if ( !m_printDialogData.GetAllPages() ) - { - minPageNum = minPage; - maxPageNum = maxPage; - } - else { minPageNum = m_printDialogData.GetFromPage(); maxPageNum = m_printDialogData.GetToPage(); @@ -246,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; @@ -292,8 +284,6 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt sm_abortWindow = NULL; } - wxEndBusyCursor(); - delete dc; return (sm_lastError == wxPRINTER_NO_ERROR);