Skip to content
Permalink
Browse files

Ensure multiipolygon dimensionality is respected when adding new surf…

…aces
  • Loading branch information
nyalldawson committed Sep 26, 2017
1 parent 0249310 commit 6c328d53aa0af071a24f82a5c09f4eb063a41f55
Showing with 13 additions and 1 deletion.
  1. +13 −1 src/core/geometry/qgsmultipolygon.cpp
@@ -132,7 +132,19 @@ bool QgsMultiPolygonV2::addGeometry( QgsAbstractGeometry *g )
return false;
}

setZMTypeFromSubGeometry( g, QgsWkbTypes::MultiPolygon );
if ( mGeometries.empty() )
{
setZMTypeFromSubGeometry( g, QgsWkbTypes::MultiPolygon );
}
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 6c328d5

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