Skip to content

Commit c360e37

Browse files
committed
Fix test failure
1 parent 34b9d39 commit c360e37

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/geometry/qgsgeometry.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1873,7 +1873,10 @@ QgsGeometry QgsGeometry::centroid() const
18731873
// avoid calling geos for trivial point centroids
18741874
if ( QgsWkbTypes::flatType( d->geometry->wkbType() ) == QgsWkbTypes::Point )
18751875
{
1876-
return *this;
1876+
QgsGeometry c = *this;
1877+
c.get()->dropZValue();
1878+
c.get()->dropMValue();
1879+
return c;
18771880
}
18781881

18791882
QgsGeos geos( d->geometry.get() );

0 commit comments

Comments
 (0)