Skip to content
Permalink
Browse files

Ensure multilinestring dimensionality is respected when adding new lines

  • Loading branch information
nyalldawson committed Sep 25, 2017
1 parent ed72e37 commit 1de7b42588aa530f926cb64f78b12fbe06f39bbf
Showing with 12 additions and 1 deletion.
  1. +12 −1 src/core/geometry/qgsmultilinestring.cpp
@@ -116,7 +116,18 @@ bool QgsMultiLineString::addGeometry( QgsAbstractGeometry *g )
return false;
}

setZMTypeFromSubGeometry( g, QgsWkbTypes::MultiLineString );
if ( mGeometries.empty() )
{
setZMTypeFromSubGeometry( g, QgsWkbTypes::MultiLineString );
}
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 1de7b42

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