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