Skip to content
Permalink
Browse files

Fix default filename for atlas pdf outputs

  • Loading branch information
nyalldawson committed Jan 6, 2018
1 parent e9100cd commit 89884e8a0c5bd1d9cdade7423f32c09076016b78
Showing with 1 addition and 10 deletions.
  1. +1 −10 src/app/layout/qgslayoutdesignerdialog.cpp
@@ -2635,16 +2635,7 @@ void QgsLayoutDesignerDialog::exportAtlasToPdf()
{
QString lastUsedFile = settings.value( QStringLiteral( "lastSaveAsPdfFile" ), QStringLiteral( "qgis.pdf" ), QgsSettings::App ).toString();
QFileInfo file( lastUsedFile );

QgsLayoutAtlas *printAtlas = atlas();
if ( printAtlas && printAtlas->enabled() && mActionAtlasPreview->isChecked() )
{
outputFileName = QDir( file.path() ).filePath( QgsFileUtils::stringToSafeFilename( printAtlas->currentFilename() ) + QStringLiteral( ".pdf" ) );
}
else
{
outputFileName = file.path() + '/' + QgsFileUtils::stringToSafeFilename( mMasterLayout->name() ) + QStringLiteral( ".pdf" );
}
outputFileName = file.path() + '/' + QgsFileUtils::stringToSafeFilename( mMasterLayout->name() ) + QStringLiteral( ".pdf" );

#ifdef Q_OS_MAC
QgisApp::instance()->activateWindow();

0 comments on commit 89884e8

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