printout->SetPageSizeMM((int)w, (int)h);
// Create an abort window
- wxBeginBusyCursor();
+ wxBusyCursor busyCursor;
printout->OnPreparePrinting();
if (maxPage == 0)
{
sm_lastError = wxPRINTER_ERROR;
- wxEndBusyCursor();
return false;
}
if (!win)
{
- wxEndBusyCursor();
wxLogDebug(wxT("Could not create an abort dialog."));
sm_lastError = wxPRINTER_ERROR;
int minPageNum = minPage, maxPageNum = maxPage;
if ( !m_printDialogData.GetAllPages() )
- {
- minPageNum = minPage;
- maxPageNum = maxPage;
- }
- else
{
minPageNum = m_printDialogData.GetFromPage();
maxPageNum = m_printDialogData.GetToPage();
{
if ( !printout->OnBeginDocument(minPageNum, maxPageNum) )
{
- wxEndBusyCursor();
wxLogError(_("Could not start printing."));
sm_lastError = wxPRINTER_ERROR;
break;
sm_abortWindow = NULL;
}
- wxEndBusyCursor();
-
delete dc;
return (sm_lastError == wxPRINTER_NO_ERROR);