Skip to content

Commit

Permalink
[spatialquery] shows the warning in message bar when no layer is load…
Browse files Browse the repository at this point in the history
…ed in canvas
  • Loading branch information
slarosa committed Dec 2, 2013
1 parent f12e1e0 commit f5aca96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/spatialquery/qgsspatialqueryplugin.cpp
Expand Up @@ -24,6 +24,7 @@
#include "qgisinterface.h"
#include "qgsapplication.h"
#include "qgsmaplayerregistry.h"
#include "qgsmessagebar.h"

//
// Required plugin includes
Expand Down Expand Up @@ -111,7 +112,7 @@ void QgsSpatialQueryPlugin::run()
QString msg;
if ( ! QgsSpatialQueryDialog::hasPossibleQuery( msg ) )
{
QMessageBox::warning( mIface->mainWindow(), tr( "Query not executed" ), msg, QMessageBox::Ok );
mIface->messageBar()->pushMessage( tr( "Query not executed" ), msg, QgsMessageBar::INFO, mIface->messageTimeout() );
return;
}
mDialog = new QgsSpatialQueryDialog( mIface->mainWindow(), mIface );
Expand Down

0 comments on commit f5aca96

Please sign in to comment.