Skip to content

Commit

Permalink
Fix default filename for atlas pdf outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 6, 2018
1 parent e9100cd commit 89884e8
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 89884e8

Please sign in to comment.