diff --git a/python/plugins/fTools/tools/doValidate.py b/python/plugins/fTools/tools/doValidate.py index dfc8ba9412b..2f34f07cb01 100644 --- a/python/plugins/fTools/tools/doValidate.py +++ b/python/plugins/fTools/tools/doValidate.py @@ -156,12 +156,11 @@ class validateThread( QThread ): else: #layer = vlayer # requires SIP >= 4.9 layer = [] - layer.select([]) # select all features, and ignore attributes + vlayer.select([]) # select all features, and ignore attributes ft = QgsFeature() - while vlayer.nextFeature(ft) - layer.append(ft) - ft = QgsFeature() - nFeat = layer.featureCount() + while vlayer.nextFeature(ft): + layer.append(QgsFeature(ft)) + nFeat = len(layer) nElement = 0 if nFeat > 0: self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), 0 )