[QGIS Commit] r13024 - trunk/qgis/python/plugins/fTools/tools
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Mar 8 14:57:36 EST 2010
Author: cfarmer
Date: 2010-03-08 14:57:34 -0500 (Mon, 08 Mar 2010)
New Revision: 13024
Modified:
trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py
Log:
reactivate select by location progress bar. Fixes #2517; Thanks to alexbruy for the patch!
Modified: trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py 2010-03-08 17:51:23 UTC (rev 13023)
+++ trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py 2010-03-08 19:57:34 UTC (rev 13024)
@@ -62,20 +62,25 @@
selectedSet = []
selectProvider.nextFeature(feat)
geomLayer = QgsGeometry(feat.geometry())
+
+ self.progressBar.setMaximum( inputProvider.featureCount() + selectProvider.featureCount() )
+
while selectProvider.nextFeature(feat):
geomLayer = geomLayer.combine(QgsGeometry(feat.geometry()))
+ self.progressBar.setValue( self.progressBarValue() + 1 )
while inputProvider.nextFeature(feat):
geom = QgsGeometry(feat.geometry())
if geom.intersects(geomLayer):
selectedSet.append(feat.id())
+ self.progressBar.setValue( self.progressBarValue() + 1 )
if modify == self.tr("adding to current selection"):
selectedSet = list(set(inputLayer.selectedFeaturesIds()).union(selectedSet))
elif modify == self.tr("removing from current selection"):
selectedSet = list(set(inputLayer.selectedFeaturesIds()).difference(selectedSet))
inputLayer.setSelectedFeatures(selectedSet)
-
+
#Gets vector layer by layername in canvas
-#Return: QgsVectorLayer
+#Return: QgsVectorLayer
def getVectorLayerByName(self, myName):
mc = self.iface.mapCanvas()
nLayers = mc.layerCount()
More information about the QGIS-commit
mailing list