[Libreoffice-commits] core.git: vcl/source
Armin Le Grand
Armin.Le.Grand at cib.de
Mon Apr 2 13:46:53 UTC 2018
vcl/source/window/printdlg.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit fb4660e217de4658587a62fd58f038f4b984277f
Author: Armin Le Grand <Armin.Le.Grand at 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();
More information about the Libreoffice-commits
mailing list