X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/58c837a4e67c0996134cc0947691dc09c5f26687..bcaa23de098c1276b3f35716c9ea8b73cf3599bd:/src/common/prntbase.cpp diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 5003ec570a..6709e37217 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -55,7 +55,6 @@ #endif #endif // __WXMSW__ -#if !USE_SHARED_LIBRARY IMPLEMENT_CLASS(wxPrinterBase, wxObject) IMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject) IMPLEMENT_CLASS(wxPreviewCanvas, wxWindow) @@ -71,7 +70,6 @@ BEGIN_EVENT_TABLE(wxPreviewCanvas, wxScrolledWindow) EVT_PAINT(wxPreviewCanvas::OnPaint) EVT_SYS_COLOUR_CHANGED(wxPreviewCanvas::OnSysColourChanged) END_EVENT_TABLE() -#endif /* * Printer @@ -197,6 +195,11 @@ void wxPreviewCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) wxPaintDC dc(this); PrepareDC( dc ); +#ifdef __WXGTK__ + if (!GetUpdateRegion().IsEmpty()) + dc.SetClippingRegion( GetUpdateRegion() ); +#endif + if (m_printPreview) { m_printPreview->PaintPage(this, dc); @@ -780,10 +783,10 @@ void wxPrintPreviewBase::SetZoom(int percent) m_previewBitmap = NULL; } - if (m_previewCanvas) { RenderPage(m_currentPage); + ((wxScrolledWindow *) m_previewCanvas)->Scroll(0, 0); m_previewCanvas->Clear(); m_previewCanvas->Refresh(); }