diff --git a/src/core/geometry/qgsgeometry.cpp b/src/core/geometry/qgsgeometry.cpp index ee6482b63a2de..0f0e149c140b6 100644 --- a/src/core/geometry/qgsgeometry.cpp +++ b/src/core/geometry/qgsgeometry.cpp @@ -24,6 +24,7 @@ email : morb at ozemail dot com dot au #include "qgsgeometry.h" #include "qgsgeometryeditutils.h" #include "qgsgeometryfactory.h" +#include "qgssettingsregistrycore.h" #include @@ -1537,11 +1538,11 @@ QVector QgsGeometry::coerceToType( const QgsWkbTypes::Type type ) c // Add Z/M back, set to 0 if ( ! newGeom.constGet()->is3D() && QgsWkbTypes::hasZ( type ) ) { - newGeom.get()->addZValue( 0.0 ); + newGeom.get()->addZValue( QgsSettingsRegistryCore::settingsDigitizingDefaultZValue.value() ); } if ( ! newGeom.constGet()->isMeasure() && QgsWkbTypes::hasM( type ) ) { - newGeom.get()->addMValue( 0.0 ); + newGeom.get()->addMValue( QgsSettingsRegistryCore::settingsDigitizingDefaultMValue.value() ); } // Multi -> single