Skip to content
Permalink
Browse files
Revert "replace convertTo/set by add{M,Z}Value"
This reverts commit 739e6d5.
  • Loading branch information
lbartoletti authored and nyalldawson committed Jun 9, 2021
1 parent 7c0f3a1 commit 6d5411b3083e243afb164fb0d8b8477db8caa15a
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/core/geometry/qgsgeometryutils.cpp
@@ -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 )
@@ -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;
}
@@ -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;
}

0 comments on commit 6d5411b

Please sign in to comment.