From: Vadim Zeitlin Date: Sun, 8 Feb 2004 13:30:23 +0000 (+0000) Subject: use wxBusyCursor class instead of wxBeginBusyCursor and several (mismatched and thus... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0f07e3dc2480b6a9e963162fe9bf53495b3f1f71 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 --- 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);