Skip to content

Commit

Permalink
[layouts] Fix incorrect path shown after export atlas to pdf
Browse files Browse the repository at this point in the history
Fixes #19013
  • Loading branch information
nyalldawson committed May 24, 2018
1 parent e906a2c commit dde895d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2755,6 +2755,7 @@ void QgsLayoutDesignerDialog::exportAtlasToPdf()

QString outputFileName;
QgsSettings settings;
QString dir;
if ( singleFile )
{
QString lastUsedFile = settings.value( QStringLiteral( "lastSaveAsPdfFile" ), QStringLiteral( "qgis.pdf" ), QgsSettings::App ).toString();
Expand Down Expand Up @@ -2820,7 +2821,7 @@ void QgsLayoutDesignerDialog::exportAtlasToPdf()
{
return;
}
QString dir = files.at( 0 );
dir = files.at( 0 );
if ( dir.isEmpty() )
{
return;
Expand Down Expand Up @@ -2900,7 +2901,7 @@ void QgsLayoutDesignerDialog::exportAtlasToPdf()
else
{
mMessageBar->pushMessage( tr( "Export atlas" ),
tr( "Successfully exported atlas to <a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( outputFileName ).toString(), QDir::toNativeSeparators( outputFileName ) ),
tr( "Successfully exported atlas to <a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( dir ).toString(), QDir::toNativeSeparators( dir ) ),
Qgis::Success, 0 );
}
break;
Expand Down

0 comments on commit dde895d

Please sign in to comment.