Skip to content
Permalink
Browse files

Snap Geometries algorithm is capable of running in-place mode

(cherry picked from commit 4e1e684)
  • Loading branch information
nyalldawson committed Mar 6, 2020
1 parent 91fc058 commit c6b2970ab8ec15ac6d1233b8ff6bde90bffb1cda
Showing with 8 additions and 0 deletions.
  1. +8 −0 python/plugins/processing/algs/qgis/SnapGeometries.py
@@ -26,6 +26,8 @@
QgsInternalGeometrySnapper)
from qgis.core import (QgsFeatureSink,
QgsProcessing,
QgsMapLayer,
QgsProcessingAlgorithm,
QgsProcessingException,
QgsProcessingParameterDistance,
QgsProcessingParameterFeatureSource,
@@ -83,6 +85,12 @@ def name(self):
def displayName(self):
return self.tr('Snap geometries to layer')

def flags(self):
return super().flags() | QgsProcessingAlgorithm.FlagSupportsInPlaceEdits

def supportInPlaceEdit(self, layer):
return layer.type() == QgsMapLayer.VectorLayer

def processAlgorithm(self, parameters, context, feedback):
source = self.parameterAsSource(parameters, self.INPUT, context)
if source is None:

0 comments on commit c6b2970

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