Skip to content
Permalink
Browse files
-Prevent QgsRasterLayer::idenfity() from proceeding if the provider k…
…ey is wms

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

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9414 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
ersts committed Sep 26, 2008
1 parent 1b763f6 commit 25120609b999c10a1d37b740aeeaa0cacbdfb434
Showing with 11 additions and 4 deletions.
  1. +1 −1 python/core/qgsrasterlayer.sip
  2. +9 −2 src/core/raster/qgsrasterlayer.cpp
  3. +1 −1 src/core/raster/qgsrasterlayer.h
@@ -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
*
@@ -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();

@@ -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 )
@@ -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
*

0 comments on commit 2512060

Please sign in to comment.