[TD]enforce center mark print rule on print preview

This commit is contained in:
wandererfan
2025-11-14 15:38:16 -05:00
committed by Chris Hennes
parent cf656ba77e
commit 484c89818c
4 changed files with 11 additions and 5 deletions

View File

@@ -305,7 +305,7 @@ void PagePrinter::renderPage(ViewProviderPage* vpp, QPainter& painter, QRectF& s
/// print the Page associated with the view provider
void PagePrinter::print(ViewProviderPage* vpPage, QPrinter* printer)
void PagePrinter::print(ViewProviderPage* vpPage, QPrinter* printer, bool isPreview)
{
QPageLayout pageLayout = printer->pageLayout();
@@ -318,7 +318,8 @@ void PagePrinter::print(ViewProviderPage* vpPage, QPrinter* printer)
QPainter painter(printer);
auto ourScene = vpPage->getQGSPage();
if (!printer->outputFileName().isEmpty()) {
if (!printer->outputFileName().isEmpty() ||
isPreview) {
ourScene->setExportingPdf(true);
}
auto ourDoc = Gui::Application::Instance->getDocument(dPage->getDocument());