Skip to content

Commit d9f3afa

Browse files
author
ersts
committedSep 26, 2008
-Prevent QgsRasterLayer::idenfity() from proceeding if the provider key is wms
-Change QgsRasterLayer::identify() to return a bool git-svn-id: http://svn.osgeo.org/qgis/trunk@9414 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 21d3827 commit d9f3afa

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed
 

‎python/core/qgsrasterlayer.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public:
7777
*
7878
* \param point[in] a coordinate in the CRS of this layer.
7979
*/
80-
void identify(const QgsPoint & point, QMap<QString,QString>& results /Out/);
80+
bool identify(const QgsPoint & point, QMap<QString,QString>& results /Out/);
8181

8282
/** \brief Identify arbitrary details from the WMS server found on the point position
8383
*

‎src/core/raster/qgsrasterlayer.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4416,8 +4416,14 @@ bool QgsRasterLayer::writeXml( QDomNode & layer_node,
44164416

44174417

44184418

4419-
void QgsRasterLayer::identify( const QgsPoint& point, QMap<QString, QString>& results )
4419+
bool QgsRasterLayer::identify( const QgsPoint& point, QMap<QString, QString>& results )
44204420
{
4421+
results.clear();
4422+
if ( mProviderKey == "wms" )
4423+
{
4424+
return false;
4425+
}
4426+
44214427
double x = point.x();
44224428
double y = point.y();
44234429

@@ -4478,7 +4484,8 @@ void QgsRasterLayer::identify( const QgsPoint& point, QMap<QString, QString>& re
44784484
}
44794485
}
44804486

4481-
} // void QgsRasterLayer::identify
4487+
return true;
4488+
} // bool QgsRasterLayer::identify
44824489

44834490

44844491
QString QgsRasterLayer::identifyAsText( const QgsPoint& point )

‎src/core/raster/qgsrasterlayer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
252252
*
253253
* \param point[in] a coordinate in the CRS of this layer.
254254
*/
255-
void identify( const QgsPoint & point, QMap<QString, QString>& results );
255+
bool identify( const QgsPoint & point, QMap<QString, QString>& results );
256256

257257
/** \brief Identify arbitrary details from the WMS server found on the point position
258258
*

0 commit comments

Comments
 (0)
Please sign in to comment.