X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/809934d22ad2e97d67655ecb4b06b29b5d2a361d..7826e2dd838d59c6a8061b4fdd9f7326a6e06de3:/src/common/prntbase.cpp diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 6709e37217..a233f0f206 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -82,10 +82,12 @@ wxPrinterBase::wxPrinterBase(wxPrintDialogData *data) sm_abortIt = FALSE; if (data) m_printDialogData = (*data); + sm_lastError = wxPRINTER_NO_ERROR; } wxWindow *wxPrinterBase::sm_abortWindow = (wxWindow *) NULL; bool wxPrinterBase::sm_abortIt = FALSE; +wxPrinterError wxPrinterBase::sm_lastError = wxPRINTER_NO_ERROR; wxPrinterBase::~wxPrinterBase() { @@ -195,10 +197,12 @@ void wxPreviewCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) wxPaintDC dc(this); PrepareDC( dc ); +/* #ifdef __WXGTK__ if (!GetUpdateRegion().IsEmpty()) dc.SetClippingRegion( GetUpdateRegion() ); #endif +*/ if (m_printPreview) { @@ -651,12 +655,14 @@ bool wxPrintPreviewBase::PaintPage(wxWindow *canvas, wxDC& dc) bool wxPrintPreviewBase::RenderPage(int pageNum) { + wxBusyCursor busy; + int canvasWidth, canvasHeight; if (!m_previewCanvas) { - wxMessageBox(_("wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to let me know about the canvas!"), - _("Print Preview Failure"), wxOK); + wxFAIL_MSG(_T("wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to let me know about the canvas!")); + return FALSE; } m_previewCanvas->GetSize(&canvasWidth, &canvasHeight);