Skip to content

Commit

Permalink
Use messagebar instead of messagebox for animation export reports
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson authored and nirvn committed May 18, 2020
1 parent f2b6ca9 commit efecc6f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/qgstemporalcontrollerdockwidget.cpp
Expand Up @@ -24,6 +24,7 @@
#include "qgstemporalutils.h"
#include "qgstaskmanager.h"
#include "qgsproxyprogresstask.h"
#include "qgsmessagebar.h"

#include <QProgressDialog>
#include <QMessageBox>
Expand Down Expand Up @@ -96,7 +97,13 @@ void QgsTemporalControllerDockWidget::exportAnimation()
progressDialog.hide();
if ( !success )
{
QMessageBox::warning( this, tr( "Export Animation" ), error );
QgisApp::instance()->messageBar()->pushMessage( tr( "Export Animation" ), error, Qgis::Critical );
}
else
{
QgisApp::instance()->messageBar()->pushMessage( tr( "Export Animation" ),
tr( "Successfully exported animation to <a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( outputDir ).toString(), QDir::toNativeSeparators( outputDir ) ),
Qgis::Success, 0 );
}
} );
dlg->setAttribute( Qt::WA_DeleteOnClose );
Expand Down

0 comments on commit efecc6f

Please sign in to comment.