[QGIS Commit] r9414 - in trunk/qgis: python/core src/core/raster

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Sep 26 13:19:56 EDT 2008


Author: ersts
Date: 2008-09-26 13:19:56 -0400 (Fri, 26 Sep 2008)
New Revision: 9414

Modified:
   trunk/qgis/python/core/qgsrasterlayer.sip
   trunk/qgis/src/core/raster/qgsrasterlayer.cpp
   trunk/qgis/src/core/raster/qgsrasterlayer.h
Log:
-Prevent QgsRasterLayer::idenfity() from proceeding if the provider key is wms
-Change QgsRasterLayer::identify() to return a bool

Modified: trunk/qgis/python/core/qgsrasterlayer.sip
===================================================================
--- trunk/qgis/python/core/qgsrasterlayer.sip	2008-09-26 16:32:14 UTC (rev 9413)
+++ trunk/qgis/python/core/qgsrasterlayer.sip	2008-09-26 17:19:56 UTC (rev 9414)
@@ -77,7 +77,7 @@
      *
      * \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
      *

Modified: trunk/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2008-09-26 16:32:14 UTC (rev 9413)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2008-09-26 17:19:56 UTC (rev 9414)
@@ -4416,8 +4416,14 @@
 
 
 
-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
+  return true;
+} // bool QgsRasterLayer::identify
 
 
 QString QgsRasterLayer::identifyAsText( const QgsPoint& point )

Modified: trunk/qgis/src/core/raster/qgsrasterlayer.h
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.h	2008-09-26 16:32:14 UTC (rev 9413)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.h	2008-09-26 17:19:56 UTC (rev 9414)
@@ -252,7 +252,7 @@
      *
      * \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
      *



More information about the QGIS-commit mailing list