Skip to content

Commit

Permalink
Speed up getFeatures query by using a proper QgsFeatureRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Oct 19, 2018
1 parent 71e2a6b commit adb930b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/AlgorithmExecutor.py
Expand Up @@ -183,7 +183,7 @@ def execute_in_place_run(alg, parameters, context=None, feedback=None, raise_exc
else:
active_layer.deleteFeature(f.id())
# Get the new ids
old_ids = set([f.id() for f in active_layer.getFeatures()])
old_ids = set([f.id() for f in active_layer.getFeatures(req)])
if not active_layer.addFeatures(new_features):
raise QgsProcessingException(tr("Error adding processed features back into the layer."))
new_ids = set([f.id() for f in active_layer.getFeatures(req)])
Expand Down

0 comments on commit adb930b

Please sign in to comment.