Skip to content

Commit

Permalink
[ui] add hyperlink to saved image/PDF in the message bar
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Dec 22, 2017
1 parent 1e3526e commit 36c4ac4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/qgsmapsavedialog.cpp
Expand Up @@ -402,7 +402,8 @@ void QgsMapSaveDialog::onAccepted()

connect( mapRendererTask, &QgsMapRendererTask::renderingComplete, [ = ]
{
QgisApp::instance()->messageBar()->pushSuccess( tr( "Save as image" ), tr( "Successfully saved map to image" ) );
QgisApp::instance()->messageBar()->pushSuccess( tr( "Save as image" ), tr( "Successfully saved map to <a href=\"%1\">%2</a>" )
.arg( QUrl::fromLocalFile( QFileInfo( fileNameAndFilter.first ).path() ).toString(), fileNameAndFilter.first ) );
} );
connect( mapRendererTask, &QgsMapRendererTask::errorOccurred, [ = ]( int error )
{
Expand Down Expand Up @@ -450,7 +451,8 @@ void QgsMapSaveDialog::onAccepted()

connect( mapRendererTask, &QgsMapRendererTask::renderingComplete, [ = ]
{
QgisApp::instance()->messageBar()->pushSuccess( tr( "Save as PDF" ), tr( "Successfully saved map to PDF" ) );
QgisApp::instance()->messageBar()->pushSuccess( tr( "Save as PDF" ), tr( "Successfully saved map to <a href=\"%1\">%2</a>" )
.arg( QUrl::fromLocalFile( QFileInfo( fileName ).path() ).toString(), fileName ) );
} );
connect( mapRendererTask, &QgsMapRendererTask::errorOccurred, [ = ]( int )
{
Expand Down

0 comments on commit 36c4ac4

Please sign in to comment.