From 27b43064b373d19cbce17f9fc73af4e9a2a8884b Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 25 Sep 2017 12:39:44 +1000 Subject: [PATCH] Fix incorrect wkb type for compound curve when adding vertex to empty curve --- src/core/geometry/qgscompoundcurve.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/geometry/qgscompoundcurve.cpp b/src/core/geometry/qgscompoundcurve.cpp index 0a70b12afb6..5bdd17190c1 100644 --- a/src/core/geometry/qgscompoundcurve.cpp +++ b/src/core/geometry/qgscompoundcurve.cpp @@ -436,7 +436,7 @@ void QgsCompoundCurve::removeCurve( int i ) void QgsCompoundCurve::addVertex( const QgsPoint &pt ) { - if ( mWkbType == QgsWkbTypes::Unknown ) + if ( mCurves.isEmpty() || mWkbType == QgsWkbTypes::Unknown ) { setZMTypeFromSubGeometry( &pt, QgsWkbTypes::CompoundCurve ); }