Skip to content

Commit

Permalink
Fix setting correct WKB type for compound curves when adding first curve
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 21, 2017
1 parent cee1f56 commit 9d9c0e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/geometry/qgscompoundcurve.cpp
Expand Up @@ -396,13 +396,13 @@ void QgsCompoundCurve::addCurve( QgsCurve *c )
{
if ( c )
{
mCurves.append( c );

if ( mWkbType == QgsWkbTypes::Unknown )
if ( mCurves.empty() )
{
setZMTypeFromSubGeometry( c, QgsWkbTypes::CompoundCurve );
}

mCurves.append( c );

if ( QgsWkbTypes::hasZ( mWkbType ) && !QgsWkbTypes::hasZ( c->wkbType() ) )
{
c->addZValue();
Expand Down

0 comments on commit 9d9c0e4

Please sign in to comment.