vcl/source/window/printdlg.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit fb4660e217de4658587a62fd58f038f4b984277f
Author: Armin Le Grand <armin.le.gr...@cib.de>
Date:   Mon Apr 2 15:44:45 2018 +0200

    PrintPreviewWindow dynamic preview Bitmap II
    
    Added reset of PreviewBitmap when new/different Metafile
    gets set
    
    Change-Id: Ib8053c21fc868607adfff4f1a75f005d29ce356b

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 4fba6f5e5d6b..d7124a15fc3b 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -243,6 +243,10 @@ void PrintDialog::PrintPreviewWindow::setPreview( const 
GDIMetaFile& i_rNewPrevi
     aBuf.appendAscii( eUnit == MapUnit::MapMM ? "mm" : "in" );
     maVertDim->SetText( aBuf.makeStringAndClear() );
 
+    // We have a new Metafile and evtl. a new page, so we need to reset
+    // the PreviewBitmap to force new creation
+    maPreviewBitmap = Bitmap();
+
     // sets/calculates e.g. maPreviewSize
     // also triggers preparePreviewBitmap()
     Resize();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to