Skip to content
Permalink
Browse files

[spatialquery] shows the warning in message bar when no layer is load…

…ed in canvas
  • Loading branch information
slarosa committed Dec 1, 2013
1 parent f12e1e0 commit f5aca962f5042660c89435642651012db0bd2959
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/plugins/spatialquery/qgsspatialqueryplugin.cpp
@@ -24,6 +24,7 @@
#include "qgisinterface.h"
#include "qgsapplication.h"
#include "qgsmaplayerregistry.h"
#include "qgsmessagebar.h"

//
// Required plugin includes
@@ -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 );

0 comments on commit f5aca96

Please sign in to comment.
You can’t perform that action at this time.