Skip to content

Commit

Permalink
Fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 28, 2018
1 parent 34b9d39 commit c360e37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/geometry/qgsgeometry.cpp
Expand Up @@ -1873,7 +1873,10 @@ QgsGeometry QgsGeometry::centroid() const
// avoid calling geos for trivial point centroids
if ( QgsWkbTypes::flatType( d->geometry->wkbType() ) == QgsWkbTypes::Point )
{
return *this;
QgsGeometry c = *this;
c.get()->dropZValue();
c.get()->dropMValue();
return c;
}

QgsGeos geos( d->geometry.get() );
Expand Down

0 comments on commit c360e37

Please sign in to comment.