mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
[processing] remove debug line and fix spatial index creation
This commit is contained in:
parent
63955e6574
commit
700441eec9
@ -127,13 +127,11 @@ class AlgorithmDialog(AlgorithmDialogBase):
|
||||
unmatchingCRS = True
|
||||
if isinstance(param, ParameterExtent):
|
||||
value = self.mainWidget.valueItems[param.name].leText.text().strip()
|
||||
print value
|
||||
if value:
|
||||
hasExtent = True
|
||||
|
||||
return hasExtent and unmatchingCRS
|
||||
|
||||
|
||||
def accept(self):
|
||||
self.settings.setValue("/Processing/dialogBase", self.saveGeometry())
|
||||
|
||||
|
@ -221,7 +221,13 @@ def testForUniqueness(fieldList1, fieldList2):
|
||||
def spatialindex(layer):
|
||||
"""Creates a spatial index for the passed vector layer.
|
||||
"""
|
||||
idx = QgsSpatialIndex(features(layer))
|
||||
request = QgsFeatureRequest()
|
||||
request.setSubsetOfAttributes([])
|
||||
if ProcessingConfig.getSetting(ProcessingConfig.USE_SELECTED) \
|
||||
and layer.selectedFeatureCount() > 0:
|
||||
idx = layer.selectedFeaturesIterator(request)
|
||||
else:
|
||||
idx = QgsSpatialIndex(layer.getFeatures(request))
|
||||
return idx
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user