Skip to content

Commit

Permalink
Fix incomplete message bar messages when exporting items from model
Browse files Browse the repository at this point in the history
designer
  • Loading branch information
nyalldawson authored and github-actions[bot] committed Jul 27, 2021
1 parent 2755615 commit 7228ac4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/gui/processing/models/qgsmodeldesignerdialog.cpp
Expand Up @@ -640,7 +640,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::MessageLevel::Success, 0 );
mMessageBar->pushMessage( QString(), tr( "Successfully exported model as image to <a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( filename ).toString(), QDir::toNativeSeparators( filename ) ), Qgis::MessageLevel::Success, 0 );
repaintModel( true );
}

Expand Down Expand Up @@ -668,7 +668,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::MessageLevel::Success, 0 );
mMessageBar->pushMessage( QString(), tr( "Successfully exported model as PDF to <a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( filename ).toString(),
QDir::toNativeSeparators( filename ) ), Qgis::MessageLevel::Success, 0 );
repaintModel( true );
}

Expand Down Expand Up @@ -696,7 +697,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::MessageLevel::Success, 0 );
mMessageBar->pushMessage( QString(), tr( "Successfully exported model as SVG to <a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( filename ).toString(), QDir::toNativeSeparators( filename ) ), Qgis::MessageLevel::Success, 0 );
repaintModel( true );
}

Expand All @@ -719,7 +720,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::MessageLevel::Success, 0 );
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::MessageLevel::Success, 0 );
}

void QgsModelDesignerDialog::toggleComments( bool show )
Expand Down

0 comments on commit 7228ac4

Please sign in to comment.