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 =