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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Nov 14 09:02:42 EST 2010


Author: cfarmer
Date: 2010-11-14 06:02:42 -0800 (Sun, 14 Nov 2010)
New Revision: 14639

Modified:
   trunk/qgis/python/plugins/fTools/tools/doValidate.py
Log:
patch from alexbruy to make sure check_geometry works with current version of qgis (previous commit required SIP SIP >= 4.9.

Modified: trunk/qgis/python/plugins/fTools/tools/doValidate.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doValidate.py	2010-11-14 14:00:57 UTC (rev 14638)
+++ trunk/qgis/python/plugins/fTools/tools/doValidate.py	2010-11-14 14:02:42 UTC (rev 14639)
@@ -154,8 +154,13 @@
       layer = vlayer.selectedFeatures()
       nFeat = len(layer)
     else:
-      layer = vlayer
+      #layer = vlayer # requires SIP >= 4.9
+      layer = []
       layer.select([]) # select all features, and ignore attributes
+      ft = QgsFeature()
+      while vlayer.nextFeature(ft)
+        layer.append(ft)
+        ft = QgsFeature()
       nFeat = layer.featureCount()
     nElement = 0
     if nFeat > 0:



More information about the QGIS-commit mailing list