Skip to content

Commit

Permalink
-Prevent QgsRasterLayer::idenfity() from proceeding if the provider k…
Browse files Browse the repository at this point in the history
…ey is wms

-Change QgsRasterLayer::identify() to return a bool

git-svn-id: http://svn.osgeo.org/qgis/trunk@9414 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
ersts committed Sep 26, 2008
1 parent 21d3827 commit d9f3afa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/core/qgsrasterlayer.sip
Expand Up @@ -77,7 +77,7 @@ public:
*
* \param point[in] a coordinate in the CRS of this layer.
*/
void identify(const QgsPoint & point, QMap<QString,QString>& results /Out/);
bool identify(const QgsPoint & point, QMap<QString,QString>& results /Out/);

/** \brief Identify arbitrary details from the WMS server found on the point position
*
Expand Down
11 changes: 9 additions & 2 deletions src/core/raster/qgsrasterlayer.cpp
Expand Up @@ -4416,8 +4416,14 @@ bool QgsRasterLayer::writeXml( QDomNode & layer_node,



void QgsRasterLayer::identify( const QgsPoint& point, QMap<QString, QString>& results )
bool QgsRasterLayer::identify( const QgsPoint& point, QMap<QString, QString>& results )
{
results.clear();
if ( mProviderKey == "wms" )
{
return false;
}

double x = point.x();
double y = point.y();

Expand Down Expand Up @@ -4478,7 +4484,8 @@ void QgsRasterLayer::identify( const QgsPoint& point, QMap<QString, QString>& re
}
}

} // void QgsRasterLayer::identify
return true;
} // bool QgsRasterLayer::identify


QString QgsRasterLayer::identifyAsText( const QgsPoint& point )
Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgsrasterlayer.h
Expand Up @@ -252,7 +252,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
*
* \param point[in] a coordinate in the CRS of this layer.
*/
void identify( const QgsPoint & point, QMap<QString, QString>& results );
bool identify( const QgsPoint & point, QMap<QString, QString>& results );

/** \brief Identify arbitrary details from the WMS server found on the point position
*
Expand Down

0 comments on commit d9f3afa

Please sign in to comment.