Skip to content
Permalink
Browse files

[processing] Fix execution of "Eliminate selection" through Python

Fixes #38808
  • Loading branch information
nyalldawson committed Oct 8, 2020
1 parent 29f657d commit ee7bea2305253fd276a69c25bb5d308942dcb190
Showing with 3 additions and 1 deletion.
  1. +3 −1 python/plugins/processing/algs/qgis/EliminateSelection.py
@@ -116,6 +116,8 @@ def processAlgorithm(self, parameters, context, feedback):
# write the others to output
sink.addFeature(aFeat, QgsFeatureSink.FastInsert)

del sink

# Delete all features to eliminate in processLayer
processLayer = QgsProcessingUtils.mapLayerFromString(dest_id, context)
processLayer.startEditing()
@@ -229,6 +231,6 @@ def processAlgorithm(self, parameters, context, feedback):
if feedback.isCanceled():
break

sink.addFeature(feature, QgsFeatureSink.FastInsert)
processLayer.dataProvider().addFeature(feature, QgsFeatureSink.FastInsert)

return {self.OUTPUT: dest_id}

0 comments on commit ee7bea2

Please sign in to comment.
You can’t perform that action at this time.