Skip to content
Permalink
Browse files
this code is not needed since z/m are captured from QgsMapToolCapture…
…::mapPoint and z/m are converted by QgsCircle
  • Loading branch information
lbartoletti committed Aug 18, 2021
1 parent dc448da commit 353674d91ea6fd255efe9b093d5d5a37eae76ccd
Showing with 0 additions and 18 deletions.
  1. +0 −18 src/app/qgsmaptooladdellipse.cpp
@@ -37,25 +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;
}
if ( QgsWkbTypes::hasM( point.wkbType() ) &&
point.m() != defaultMValue() )
{
ls->dropMValue();
ls->addMValue( point.m() );
break;
}
}

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

0 comments on commit 353674d

Please sign in to comment.