Skip to content
Permalink
Browse files

Make default geometry checks configurable via settings

  • Loading branch information
m-kuhn committed Mar 18, 2019
1 parent f1dc709 commit 1f0db279a02a863499a5e80e7052fb23894a3964
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 1f0db27

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