Skip to content

Commit

Permalink
allow to customize convertToCurves parameters for tracing curves
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierdalang committed Jul 15, 2020
1 parent bf7d746 commit f9ba8cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gui/qgsmaptoolcapture.cpp
Expand Up @@ -318,7 +318,10 @@ bool QgsMapToolCapture::tracingAddVertex( const QgsPointXY &point )
if ( capabilities().testFlag( QgsMapToolCapture::Capability::SupportsCurves ) && vlayer->dataProvider()->capabilities().testFlag( QgsVectorDataProvider::Capability::CircularGeometries ) )
{
QgsGeometry linear = QgsGeometry( mCaptureCurve.segmentize() );
QgsGeometry curved = linear.convertToCurves();
QgsGeometry curved = linear.convertToCurves(
settings.value( QStringLiteral( "/qgis/digitizing/convert_to_curve_angle_tolerance" ), 1e-6 ).toDouble(),
settings.value( QStringLiteral( "/qgis/digitizing/convert_to_curve_distance_tolerance" ), 1e-6 ).toDouble()
);
mCaptureCurve = *qgsgeometry_cast<QgsCompoundCurve *>( curved.constGet() );
}
}
Expand Down

0 comments on commit f9ba8cd

Please sign in to comment.