Skip to content
Permalink
Browse files

[ui] add hyperlink to saved image/PDF in the message bar

  • Loading branch information
nirvn committed Dec 22, 2017
1 parent 1e3526e commit 36c4ac46685733237ab4ddd521bf709cf2cff64e
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/app/qgsmapsavedialog.cpp
@@ -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 )
{
@@ -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 )
{

0 comments on commit 36c4ac4

Please sign in to comment.
You can’t perform that action at this time.