Skip to content

Commit

Permalink
TD: [skip ci] fix DrawingView::print/MDIViewPage::print
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Apr 2, 2021
1 parent cbdc2ac commit 033b539
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Mod/Drawing/Gui/DrawingView.cpp
Expand Up @@ -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();
Expand Down
4 changes: 1 addition & 3 deletions src/Mod/TechDraw/Gui/MDIViewPage.cpp
Expand Up @@ -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 =
Expand Down

0 comments on commit 033b539

Please sign in to comment.