diff --git a/python/core/auto_generated/qgsvectorlayer.sip.in b/python/core/auto_generated/qgsvectorlayer.sip.in index ed21049b30a..ea2d4347b17 100644 --- a/python/core/auto_generated/qgsvectorlayer.sip.in +++ b/python/core/auto_generated/qgsvectorlayer.sip.in @@ -2235,12 +2235,42 @@ Test if an edit command is active .. versionadded:: 3.0 %End - bool removeDuplicateNodes() const; +%Docstring +If the `removeDuplicateNodes` property is set on a layer, whenever a new feature enters +the edit buffer or the geometry of an existing feature is changed, duplicate nodes will +automatically be removed without any user intervention. + +.. versionadded:: 3.4 +%End + void setRemoveDuplicateNodes( bool removeDuplicateNodes ); +%Docstring +If the `removeDuplicateNodes` property is set on a layer, whenever a new feature enters +the edit buffer or the geometry of an existing feature is changed, duplicate nodes will +automatically be removed without any user intervention. + +.. versionadded:: 3.4 +%End + double geometryPrecision() const; +%Docstring +The `geometryPrecision` property of a layer will enable an automatic snap to grid operation +on a layer whenever a new feature is added or the geometry of an existing feature is changed. +If it is set to 0.0, this feature is disabled. + +.. versionadded:: 3.4 +%End + void setGeometryPrecision( double geometryPrecision ); +%Docstring +The `geometryPrecision` property of a layer will enable an automatic snap to grid +on a layer whenever a new feature is added or the geometry of an existing feature is changed. +If it is set to 0.0, this feature is disabled. + +.. versionadded:: 3.4 +%End public slots: diff --git a/src/core/qgsvectorlayer.h b/src/core/qgsvectorlayer.h index 4fa9f44b291..a9c8b9f4db4 100644 --- a/src/core/qgsvectorlayer.h +++ b/src/core/qgsvectorlayer.h @@ -2018,11 +2018,41 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte */ bool isEditCommandActive() const { return mEditCommandActive; } - + /** + * If the `removeDuplicateNodes` property is set on a layer, whenever a new feature enters + * the edit buffer or the geometry of an existing feature is changed, duplicate nodes will + * automatically be removed without any user intervention. + * + * \since QGIS 3.4 + */ bool removeDuplicateNodes() const; + + /** + * If the `removeDuplicateNodes` property is set on a layer, whenever a new feature enters + * the edit buffer or the geometry of an existing feature is changed, duplicate nodes will + * automatically be removed without any user intervention. + * + * \since QGIS 3.4 + */ void setRemoveDuplicateNodes( bool removeDuplicateNodes ); + + /** + * The `geometryPrecision` property of a layer will enable an automatic snap to grid operation + * on a layer whenever a new feature is added or the geometry of an existing feature is changed. + * If it is set to 0.0, this feature is disabled. + * + * \since QGIS 3.4 + */ double geometryPrecision() const; + + /** + * The `geometryPrecision` property of a layer will enable an automatic snap to grid + * on a layer whenever a new feature is added or the geometry of an existing feature is changed. + * If it is set to 0.0, this feature is disabled. + * + * \since QGIS 3.4 + */ void setGeometryPrecision( double geometryPrecision ); public slots: