Skip to content


reactivate select by location progress bar. Fixes #2517; Thanks to al…
Browse files Browse the repository at this point in the history
…exbruy for the patch!

git-svn-id: c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
cfarmer committed Mar 8, 2010
1 parent 0e72bcb commit c902101
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions python/plugins/fTools/tools/
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,25 @@ def compute(self, inPoly, inPts, modify):
selectedSet = []
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):
self.progressBar.setValue( self.progressBarValue() + 1 )
if modify =="adding to current selection"):
selectedSet = list(set(inputLayer.selectedFeaturesIds()).union(selectedSet))
elif modify =="removing from current selection"):
selectedSet = list(set(inputLayer.selectedFeaturesIds()).difference(selectedSet))

#Gets vector layer by layername in canvas
#Return: QgsVectorLayer
#Return: QgsVectorLayer
def getVectorLayerByName(self, myName):
mc = self.iface.mapCanvas()
nLayers = mc.layerCount()
Expand Down

0 comments on commit c902101

Please sign in to comment.