Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add links to open exported images in message bar
  • Loading branch information
nyalldawson committed Dec 17, 2017
1 parent 2631589 commit 3704c48
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -1529,7 +1529,9 @@ void QgsLayoutDesignerDialog::exportToRaster()
switch ( exporter.exportToImage( fileNExt.first, settings ) )
{
case QgsLayoutExporter::Success:
mMessageBar->pushInfo( tr( "Export layout" ), tr( "Successfully exported layout to <a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( fileNExt.first ).toString(), fileNExt.first ) );
mMessageBar->pushMessage( tr( "Export layout" ),
tr( "Successfully exported layout to <a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( fileNExt.first ).toString(), fileNExt.first ),
QgsMessageBar::INFO, 0 );
break;

case QgsLayoutExporter::PrintError:
Expand Down Expand Up @@ -1627,7 +1629,9 @@ void QgsLayoutDesignerDialog::exportToPdf()
{
case QgsLayoutExporter::Success:
{
mMessageBar->pushInfo( tr( "Export layout" ), tr( "Successfully exported layout to %1" ).arg( outputFileName ) );
mMessageBar->pushMessage( tr( "Export layout" ),
tr( "Successfully exported layout to <a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( outputFileName ).toString(), outputFileName ),
QgsMessageBar::INFO, 0 );
break;
}

Expand Down

0 comments on commit 3704c48

Please sign in to comment.