Skip to content

Commit efecc6f

Browse files
nyalldawsonnirvn
authored andcommittedMay 18, 2020
Use messagebar instead of messagebox for animation export reports
1 parent f2b6ca9 commit efecc6f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
 

‎src/app/qgstemporalcontrollerdockwidget.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "qgstemporalutils.h"
2525
#include "qgstaskmanager.h"
2626
#include "qgsproxyprogresstask.h"
27+
#include "qgsmessagebar.h"
2728

2829
#include <QProgressDialog>
2930
#include <QMessageBox>
@@ -96,7 +97,13 @@ void QgsTemporalControllerDockWidget::exportAnimation()
9697
progressDialog.hide();
9798
if ( !success )
9899
{
99-
QMessageBox::warning( this, tr( "Export Animation" ), error );
100+
QgisApp::instance()->messageBar()->pushMessage( tr( "Export Animation" ), error, Qgis::Critical );
101+
}
102+
else
103+
{
104+
QgisApp::instance()->messageBar()->pushMessage( tr( "Export Animation" ),
105+
tr( "Successfully exported animation to <a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( outputDir ).toString(), QDir::toNativeSeparators( outputDir ) ),
106+
Qgis::Success, 0 );
100107
}
101108
} );
102109
dlg->setAttribute( Qt::WA_DeleteOnClose );

0 commit comments

Comments
 (0)
Please sign in to comment.