Skip to content
Permalink
Browse files

Ensure multicurve dimensionality is respected when adding new lines

  • Loading branch information
nyalldawson committed Sep 25, 2017
1 parent c9117fc commit df1552ff18be32b5acda1053f9fce068c3433409
Showing with 13 additions and 1 deletion.
  1. +13 −1 src/core/geometry/qgsmulticurve.cpp
@@ -126,7 +126,19 @@ bool QgsMultiCurve::addGeometry( QgsAbstractGeometry *g )
return false;
}

setZMTypeFromSubGeometry( g, QgsWkbTypes::MultiCurve );
if ( mGeometries.empty() )
{
setZMTypeFromSubGeometry( g, QgsWkbTypes::MultiCurve );
}
if ( is3D() && !g->is3D() )
g->addZValue();
else if ( !is3D() && g->is3D() )
g->dropZValue();
if ( isMeasure() && !g->isMeasure() )
g->addMValue();
else if ( !isMeasure() && g->isMeasure() )
g->dropMValue();

return QgsGeometryCollection::addGeometry( g );
}

0 comments on commit df1552f

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