Skip to content

Commit

Permalink
[processing] Fix execution of "Eliminate selection" through Python
Browse files Browse the repository at this point in the history
Fixes #38808
  • Loading branch information
nyalldawson committed Oct 8, 2020
1 parent 29f657d commit ee7bea2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/plugins/processing/algs/qgis/EliminateSelection.py
Expand Up @@ -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()
Expand Down Expand Up @@ -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.