Skip to content

Commit

Permalink
Revert "replace convertTo/set by add{M,Z}Value"
Browse files Browse the repository at this point in the history
This reverts commit 739e6d5.
  • Loading branch information
lbartoletti authored and nyalldawson committed Jun 9, 2021
1 parent 7c0f3a1 commit 6d5411b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/core/geometry/qgsgeometryutils.cpp
Expand Up @@ -1815,12 +1815,14 @@ bool QgsGeometryUtils::transferFirstZOrMValueToPoint( const QgsPointSequence &po
{
if ( !mFound && pt.isMeasure() )
{
point.addMValue( pt.m() );
point.convertTo( QgsWkbTypes::addM( point.wkbType() ) );
point.setM( pt.m() );
mFound = true;
}
if ( !zFound && pt.is3D() )
{
point.addZValue( pt.z() );
point.convertTo( QgsWkbTypes::addZ( point.wkbType() ) );
point.setZ( pt.z() );
zFound = true;
}
if ( zFound && mFound )
Expand Down Expand Up @@ -1862,7 +1864,8 @@ bool QgsGeometryUtils::transferFirstMValueToPoint( const QgsPointSequence &point
{
if ( pt.isMeasure() )
{
point.addMValue( pt.m() );
point.convertTo( QgsWkbTypes::addM( point.wkbType() ) );
point.setM( pt.m() );
rc = true;
break;
}
Expand All @@ -1879,7 +1882,8 @@ bool QgsGeometryUtils::transferFirstZValueToPoint( const QgsPointSequence &point
{
if ( pt.is3D() )
{
point.addZValue( pt.z() );
point.convertTo( QgsWkbTypes::addZ( point.wkbType() ) );
point.setZ( pt.z() );
rc = true;
break;
}
Expand Down

0 comments on commit 6d5411b

Please sign in to comment.