Showing with 7 additions and 4 deletions.
  1. +4 −2 python/plugins/fTools/tools/doSelectByLocation.py
  2. +1 −0 python/plugins/fTools/tools/ftools_utils.py
  3. +2 −2 src/ui/qgsoptionsbase.ui
6 changes: 4 additions & 2 deletions python/plugins/fTools/tools/doSelectByLocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __init__(self, iface):
self.updateUI()
self.connect(self.inPoint, SIGNAL("currentIndexChanged(QString)"), self.updateCheck)
self.cmbModify.addItems([self.tr("creating new selection"), self.tr("adding to current selection"), self.tr("removing from current selection")])

def updateCheck(self, text):
vlayer = ftools_utils.getVectorLayerByName(text)
if vlayer.selectedFeatureCount() > 0:
Expand Down Expand Up @@ -107,6 +107,8 @@ def compute(self, inPoly, inPts, modify, selection):
geom = QgsGeometry()
selectedSet = []
index = ftools_utils.createIndex(inputProvider)
inputProvider.rewind()
inputProvider.select(inputProvider.attributeIndexes())
if selection:
features = selectLayer.selectedFeatures()
self.progressBar.setMaximum(len(features))
Expand All @@ -119,7 +121,7 @@ def compute(self, inPoly, inPts, modify, selection):
if geom.intersects(tmpGeom):
selectedSet.append(infeat.id())
self.progressBar.setValue(self.progressBar.value()+1)
else:
else:
self.progressBar.setMaximum(selectProvider.featureCount())
while selectProvider.nextFeature(feat):
geom = QgsGeometry(feat.geometry())
Expand Down
1 change: 1 addition & 0 deletions python/plugins/fTools/tools/ftools_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ def createIndex( provider ):
feat = QgsFeature()
index = QgsSpatialIndex()
provider.rewind()
provider.select()
while provider.nextFeature( feat ):
index.insertFeature( feat )
return index
Expand Down
4 changes: 2 additions & 2 deletions src/ui/qgsoptionsbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_14">
<item>
<widget class="QLabel" name="label_25">
<widget class="QLabel" name="label_30">
<property name="text">
<string>Scan for valid items in the browser dock</string>
</property>
Expand All @@ -632,7 +632,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_13">
<item>
<widget class="QLabel" name="label_24">
<widget class="QLabel" name="label_29">
<property name="text">
<string>Scan for contents of compressed files (.zip) in browser dock</string>
</property>
Expand Down