Skip to content
Permalink
Browse files
Fix incomplete message bar messages when exporting items from model
designer

(cherry picked from commit 1b92951)
  • Loading branch information
nyalldawson committed Aug 17, 2021
1 parent f26118e commit 0628d70742ed2f7d16564ee9c1b58e9b70463b89
Showing with 5 additions and 4 deletions.
  1. +5 −4 src/gui/processing/models/qgsmodeldesignerdialog.cpp
@@ -638,7 +638,7 @@ void QgsModelDesignerDialog::exportToImage()

img.save( filename );

mMessageBar->pushMessage( QString(), tr( "Successfully exported model as image to <a href=\"{}\">{}</a>" ).arg( QUrl::fromLocalFile( filename ).toString(), QDir::toNativeSeparators( filename ) ), Qgis::Success, 5 );
mMessageBar->pushMessage( QString(), tr( "Successfully exported model as image to <a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( filename ).toString(), QDir::toNativeSeparators( filename ) ), Qgis::Success, 5 );
repaintModel( true );
}

@@ -666,7 +666,8 @@ void QgsModelDesignerDialog::exportToPdf()
mView->scene()->render( &painter, printerRect, totalRect );
painter.end();

mMessageBar->pushMessage( QString(), tr( "Successfully exported model as PDF to <a href=\"{}\">{}</a>" ).arg( QUrl::fromLocalFile( filename ).toString(), QDir::toNativeSeparators( filename ) ), Qgis::Success, 5 );
mMessageBar->pushMessage( QString(), tr( "Successfully exported model as PDF to <a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( filename ).toString(),
QDir::toNativeSeparators( filename ) ), Qgis::Success, 5 );
repaintModel( true );
}

@@ -694,7 +695,7 @@ void QgsModelDesignerDialog::exportToSvg()
mView->scene()->render( &painter, svgRect, totalRect );
painter.end();

mMessageBar->pushMessage( QString(), tr( "Successfully exported model as SVG to <a href=\"{}\">{}</a>" ).arg( QUrl::fromLocalFile( filename ).toString(), QDir::toNativeSeparators( filename ) ), Qgis::Success, 5 );
mMessageBar->pushMessage( QString(), tr( "Successfully exported model as SVG to <a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( filename ).toString(), QDir::toNativeSeparators( filename ) ), Qgis::Success, 5 );
repaintModel( true );
}

@@ -717,7 +718,7 @@ void QgsModelDesignerDialog::exportAsPython()
fout << text;
outFile.close();

mMessageBar->pushMessage( QString(), tr( "Successfully exported model as Python script to <a href=\"{}\">{}</a>" ).arg( QUrl::fromLocalFile( filename ).toString(), QDir::toNativeSeparators( filename ) ), Qgis::Success, 5 );
mMessageBar->pushMessage( QString(), tr( "Successfully exported model as Python script to <a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( filename ).toString(), QDir::toNativeSeparators( filename ) ), Qgis::Success, 5 );
}

void QgsModelDesignerDialog::toggleComments( bool show )

0 comments on commit 0628d70

Please sign in to comment.