Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix default filename for atlas pdf outputs
- Loading branch information
Showing
with
1 addition
and
10 deletions.
-
+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(); |
|
|