Skip to content
Permalink
Browse files

Ensure multipoint dimensionality is respected when adding new points

  • Loading branch information
nyalldawson committed Sep 25, 2017
1 parent f153613 commit d4ec09c7c041475127af26581dfe5b3cce305e53
Showing with 13 additions and 1 deletion.
  1. +13 −1 src/core/geometry/qgsmultipoint.cpp
@@ -123,7 +123,19 @@ bool QgsMultiPointV2::addGeometry( QgsAbstractGeometry *g )
delete g;
return false;
}
setZMTypeFromSubGeometry( g, QgsWkbTypes::MultiPoint );
if ( mGeometries.empty() )
{
setZMTypeFromSubGeometry( g, QgsWkbTypes::MultiPoint );
}
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 d4ec09c

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