Skip to content
Permalink
Browse files

Merge pull request #9495 from m-kuhn/default-enable-geometry-checks

Make default geometry checks configurable via settings [needs-docs]
  • Loading branch information
m-kuhn committed Mar 14, 2019
2 parents a7d060b + 1645799 commit ab530e4b04865201a2ce921f4edbeb477bbc7b01
Showing with 12 additions and 1 deletion.
  1. +4 −0 resources/qgis_global_settings.ini
  2. +7 −0 src/core/qgsgeometryoptions.cpp
  3. +1 −1 src/core/qgsgeometryoptions.h
@@ -83,3 +83,7 @@ PostgreSQL\default_timeout=30
# cause performance issues, as the records must all be loaded from the related table on display.
maxEntriesRelationWidget=100

[geometry_validation]
# A comma separated list of geometry validations to enable by default for newly added layers
# Available checks: QgsIsValidCheck,QgsGeometryGapCheck,QgsGeometryOverlapCheck,QgsGeometryMissingVertexCheck
default_checks=
@@ -19,6 +19,13 @@

#include "qgsxmlutils.h"

#include "qgssettings.h"

QgsGeometryOptions::QgsGeometryOptions()
{
mGeometryChecks = QgsSettings().value( QStringLiteral( "geometry_validation/default_checks" ) ).toString().split( ',' ) ;
}

bool QgsGeometryOptions::removeDuplicateNodes() const
{
return mRemoveDuplicateNodes;
@@ -41,7 +41,7 @@ class CORE_EXPORT QgsGeometryOptions : public QObject
/**
* Create a new QgsGeometryOptions object.
*/
QgsGeometryOptions() = default;
QgsGeometryOptions();

/**
* Automatically remove duplicate nodes on all geometries which are edited on this layer.

0 comments on commit ab530e4

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