Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Apply suggestions from code review
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
  • Loading branch information
YoannQDQ and nyalldawson committed Apr 2, 2023
1 parent 5f732bd commit 9d9258c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/maptools/qgsmaptoolshapecircleabstract.cpp
Expand Up @@ -33,12 +33,12 @@ void QgsMapToolShapeCircleAbstract::addCircleToParentTool()
mParentTool->clearCurve();

// Check whether to draw the circle as a polygon or a circular string
auto layerCrs = mParentTool->layer()->crs();
auto mapCrs = mParentTool->canvas()->mapSettings().destinationCrs();
bool drawAsPolygon = layerCrs != mapCrs;
const QgsCoordinateReferenceSystem layerCrs = mParentTool->layer()->crs();
const QgsCoordinateReferenceSystem mapCrs = mParentTool->canvas()->mapSettings().destinationCrs();
const bool drawAsPolygon = layerCrs != mapCrs;
if ( drawAsPolygon )
{
int segments = QgsSettingsRegistryCore::settingsDigitizingOffsetQuadSeg->value() * 12;
const int segments = QgsSettingsRegistryCore::settingsDigitizingOffsetQuadSeg->value() * 12;
std::unique_ptr<QgsLineString> ls( mCircle.toLineString( segments ) );
mParentTool->addCurve( ls.release() );
}
Expand Down

0 comments on commit 9d9258c

Please sign in to comment.