Fix incorrect wkb type for compound curve when adding vertex to empty curve

This commit is contained in:
Nyall Dawson 2017-09-25 12:39:44 +10:00
parent 154fd61d5a
commit 27b43064b3

View File

@ -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 );
}