+ fixes #0002297: 'Export to PDF...' from drawing view does not show an error if existing file can not be overwritten
This commit is contained in:
@@ -593,6 +593,13 @@ void DrawingView::print(QPrinter* printer)
|
||||
}
|
||||
|
||||
QPainter p(printer);
|
||||
if (!p.isActive() && !printer->outputFileName().isEmpty()) {
|
||||
qApp->setOverrideCursor(Qt::ArrowCursor);
|
||||
QMessageBox::critical(this, tr("Opening file failed"),
|
||||
tr("Can't open file '%1' for writing.").arg(printer->outputFileName()));
|
||||
qApp->restoreOverrideCursor();
|
||||
return;
|
||||
}
|
||||
QRect rect = printer->paperRect();
|
||||
#ifdef Q_OS_WIN32
|
||||
// On Windows the preview looks broken when using paperRect as render area.
|
||||
|
||||
Reference in New Issue
Block a user