Skip to content
Permalink
Browse files
Merge pull request #44730 from lbartoletti/ellipseM
[Fix][MapTool] Ellipse with M value
  • Loading branch information
rouault committed Aug 28, 2021
2 parents cab7e8c + 353674d commit 1906e19899c59a691968bdd2a27d7e88909d16f6
Showing with 193 additions and 171 deletions.
  1. +0 −11 src/app/qgsmaptooladdellipse.cpp
  2. +193 −160 tests/src/app/testqgsmaptoolellipse.cpp
@@ -37,18 +37,7 @@ void QgsMapToolAddEllipse::deactivate()

mParentTool->clearCurve();

// keep z value from the first snapped point
std::unique_ptr<QgsLineString> ls( mEllipse.toLineString( segments() ) );
for ( const QgsPoint &point : std::as_const( mPoints ) )
{
if ( QgsWkbTypes::hasZ( point.wkbType() ) &&
point.z() != defaultZValue() )
{
ls->dropZValue();
ls->addZValue( point.z() );
break;
}
}

mParentTool->addCurve( ls.release() );
clean();

0 comments on commit 1906e19

Please sign in to comment.