[QGIS Commit] r13915 - trunk/qgis/python/plugins/fTools/tools

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Jul 14 05:52:13 EDT 2010


Author: cfarmer
Date: 2010-07-14 09:52:13 +0000 (Wed, 14 Jul 2010)
New Revision: 13915

Modified:
   trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py
Log:
Select by location now works on full layer extent. Fixes #2210.

Modified: trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py	2010-07-13 16:26:53 UTC (rev 13914)
+++ trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py	2010-07-14 09:52:13 UTC (rev 13915)
@@ -59,10 +59,10 @@
         selectLayer = ftools_utils.getVectorLayerByName(inPts)
         inputProvider = inputLayer.dataProvider()
         allAttrs = inputProvider.attributeIndexes()
-        inputProvider.select(allAttrs)
+        inputProvider.select(allAttrs, QgsRectangle())
         selectProvider = selectLayer.dataProvider()
         allAttrs = selectProvider.attributeIndexes()
-        selectProvider.select(allAttrs)
+        selectProvider.select(allAttrs, QgsRectangle())
         feat = QgsFeature()
         infeat = QgsFeature()
         geom = QgsGeometry()
@@ -75,6 +75,7 @@
         while selectProvider.nextFeature(feat):
             geom = QgsGeometry(feat.geometry())
             intersects = index.intersects(geom.boundingBox())
+            print len(intersects)
             for id in intersects:
                 inputProvider.featureAtId(int(id), infeat, True)
                 tmpGeom = QgsGeometry( infeat.geometry() )



More information about the QGIS-commit mailing list