Skip to content
Permalink
Browse files

Snap Geometries algorithm is capable of running in-place mode

  • Loading branch information
nyalldawson committed Mar 6, 2020
1 parent 5661000 commit 4e1e68461d201bce2a7eab636c67918ba9cc754f
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 4e1e684

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