Skip to content
Permalink
Browse files

Fix layout display when canceling export settings dialogs

(cherry picked from commit d7b4182)
  • Loading branch information
nyalldawson committed Dec 11, 2018
1 parent 39df267 commit 93fd5deebf6d04a9b92e513007993c0a61ee571f
Showing with 8 additions and 9 deletions.
  1. +8 −9 src/app/layout/qgslayoutdesignerdialog.cpp
@@ -2066,13 +2066,13 @@ void QgsLayoutDesignerDialog::exportToPdf()

setLastExportPath( outputFileName );

mView->setPaintingEnabled( false );
QgsTemporaryCursorOverride cursorOverride( Qt::BusyCursor );

QgsLayoutExporter::PdfExportSettings pdfSettings;
if ( !getPdfExportSettings( pdfSettings ) )
return;

mView->setPaintingEnabled( false );
QgsTemporaryCursorOverride cursorOverride( Qt::BusyCursor );

QgsProxyProgressTask *proxyTask = new QgsProxyProgressTask( tr( "Exporting “%1”" ).arg( mMasterLayout->name() ) );
QgsApplication::taskManager()->addTask( proxyTask );

@@ -2969,13 +2969,12 @@ void QgsLayoutDesignerDialog::exportAtlasToPdf()
outputFileName = QDir( dir ).filePath( QStringLiteral( "atlas" ) ); // filename is overridden by atlas
}

mView->setPaintingEnabled( false );
QgsTemporaryCursorOverride cursorOverride( Qt::BusyCursor );

QgsLayoutExporter::PdfExportSettings pdfSettings;
if ( !getPdfExportSettings( pdfSettings ) )
return;

mView->setPaintingEnabled( false );
QgsTemporaryCursorOverride cursorOverride( Qt::BusyCursor );
pdfSettings.rasterizeWholeImage = mLayout->customProperty( QStringLiteral( "rasterize" ), false ).toBool();

QString error;
@@ -3347,9 +3346,6 @@ void QgsLayoutDesignerDialog::exportReportToPdf()
}
setLastExportPath( outputFileName );

mView->setPaintingEnabled( false );
QgsTemporaryCursorOverride cursorOverride( Qt::BusyCursor );

bool rasterize = false;
if ( mLayout )
{
@@ -3359,6 +3355,9 @@ void QgsLayoutDesignerDialog::exportReportToPdf()
if ( !getPdfExportSettings( pdfSettings ) )
return;

mView->setPaintingEnabled( false );
QgsTemporaryCursorOverride cursorOverride( Qt::BusyCursor );

pdfSettings.rasterizeWholeImage = rasterize;

QString error;

0 comments on commit 93fd5de

Please sign in to comment.
You can’t perform that action at this time.