[TD]fix double pdf file on win (fix #16538)

This commit is contained in:
wandererfan
2024-09-21 08:24:39 -04:00
committed by Chris Hennes
parent 685d10dcfa
commit d5d66b2c70

View File

@@ -429,19 +429,6 @@ void MDIViewPage::print(QPrinter* printer)
}
}
QPainter p(printer);
// why use a QPainter to determine if we can write to a file?
if (!p.isActive() && !printer->outputFileName().isEmpty()) {
qApp->setOverrideCursor(Qt::ArrowCursor);
QMessageBox::critical(
this, tr("Opening file failed"),
tr("Can not open file %1 for writing.").arg(printer->outputFileName()));
qApp->restoreOverrideCursor();
return;
}
// free the printer from the painter
p.end();
if (m_pagePrinter) {
m_pagePrinter->print(printer);
}