From 0177f9b9f8640efcf7762756ee3d5891244ee10f Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 2 Apr 2021 12:06:24 +0200 Subject: [PATCH] TD: [skip ci] fix DrawingView::print/MDIViewPage::print --- src/Mod/Drawing/Gui/DrawingView.cpp | 2 +- src/Mod/TechDraw/Gui/MDIViewPage.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Mod/Drawing/Gui/DrawingView.cpp b/src/Mod/Drawing/Gui/DrawingView.cpp index 394479dedb..bca5828799 100644 --- a/src/Mod/Drawing/Gui/DrawingView.cpp +++ b/src/Mod/Drawing/Gui/DrawingView.cpp @@ -614,7 +614,7 @@ void DrawingView::print(QPrinter* printer) // On Windows the preview looks broken when using paperRect as render area. // Although the picture is scaled when using pageRect, it looks just fine. if (paintType == QPaintEngine::Picture) - QRect rect = printer->pageLayout().paintRectPixels(printer->resolution()); + rect = printer->pageLayout().paintRectPixels(printer->resolution()); #endif this->m_view->scene()->render(&p, rect); p.end(); diff --git a/src/Mod/TechDraw/Gui/MDIViewPage.cpp b/src/Mod/TechDraw/Gui/MDIViewPage.cpp index f0645e50c4..7bccf1bae6 100644 --- a/src/Mod/TechDraw/Gui/MDIViewPage.cpp +++ b/src/Mod/TechDraw/Gui/MDIViewPage.cpp @@ -758,9 +758,7 @@ void MDIViewPage::print(QPrinter* printer) // On Windows the preview looks broken when using paperRect as render area. // Although the picture is scaled when using pageRect, it looks just fine. if (paintType == QPaintEngine::Picture) - // FIXME: This is unused in this context, its scope is wrong. Drop the "QRect" from the next - // line and test it. -- CH 3/31/2021 - QRect targetRect = printer->pageLayout().paintRectPixels(printer->resolution()); + targetRect = printer->pageLayout().paintRectPixels(printer->resolution()); #endif //bool block =