Skip to content
Permalink
Browse files

Fix layout display when canceling export settings dialogs

  • Loading branch information
nyalldawson committed Nov 30, 2018
1 parent 1ccbdb8 commit 88077e4ab99b8f5e2e330adac96fffe8dd30e3f8
Showing with 8 additions and 9 deletions.
  1. +8 −9 src/app/layout/qgslayoutdesignerdialog.cpp
@@ -2064,13 +2064,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 );

@@ -2967,13 +2967,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;
@@ -3345,9 +3344,6 @@ void QgsLayoutDesignerDialog::exportReportToPdf()
}
setLastExportPath( outputFileName );

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

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

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

pdfSettings.rasterizeWholeImage = rasterize;

QString error;

0 comments on commit 88077e4

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