Skip to content

Commit

Permalink
Merge pull request #44730 from lbartoletti/ellipseM
Browse files Browse the repository at this point in the history
[Fix][MapTool] Ellipse with M value
  • Loading branch information
rouault committed Aug 28, 2021
2 parents cab7e8c + 353674d commit 1906e19
Show file tree
Hide file tree
Showing 2 changed files with 193 additions and 171 deletions.
11 changes: 0 additions & 11 deletions src/app/qgsmaptooladdellipse.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 1906e19

Please sign in to comment.