Use messagebar instead of messagebox for animation export reports

This commit is contained in:
Nyall Dawson 2020-05-18 08:49:31 +10:00 committed by Mathieu Pellerin
parent f2b6ca9c3f
commit efecc6f46c

View File

@ -24,6 +24,7 @@
#include "qgstemporalutils.h"
#include "qgstaskmanager.h"
#include "qgsproxyprogresstask.h"
#include "qgsmessagebar.h"
#include <QProgressDialog>
#include <QMessageBox>
@ -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 );