TechDraw: Rework view frames (#22869)

Co-authored-by: Ryan Kembrey <ryan.kembrey@student.uts>
This commit is contained in:
Ryan K
2025-08-12 02:04:58 +10:00
committed by GitHub
parent ec8d05b163
commit 4d6f0927fe
13 changed files with 194 additions and 241 deletions

View File

@@ -285,9 +285,8 @@ void PagePrinter::printBannerPage(QPrinter* printer, QPainter& painter, QPageLay
void PagePrinter::renderPage(ViewProviderPage* vpp, QPainter& painter, QRectF& sourceRect,
QRect& targetRect)
{
//turn off view frames for print
bool saveState = vpp->getFrameState();
vpp->setFrameState(false);
// Clear selection to avoid it being rendered to the file
vpp->getQGSPage()->clearSelection();
vpp->setTemplateMarkers(false);
//scene might be drawn in light text. we need to redraw in normal text.
@@ -301,8 +300,6 @@ void PagePrinter::renderPage(ViewProviderPage* vpp, QPainter& painter, QRectF& s
vpp->getQGSPage()->render(&painter, targetRect, sourceRect);
// Reset
vpp->setFrameState(saveState);
vpp->setTemplateMarkers(saveState);
Preferences::lightOnDark(saveLightOnDark);
vpp->getQGSPage()->refreshViews();