Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update src/app/maptools/qgsmaptoolshapecircleabstract.cpp
  • Loading branch information
nyalldawson committed Apr 6, 2023
1 parent de2b18a commit 4ee3c8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/maptools/qgsmaptoolshapecircleabstract.cpp
Expand Up @@ -34,11 +34,11 @@ void QgsMapToolShapeCircleAbstract::addCircleToParentTool()

// Check whether to draw the circle as a polygon or a circular string
bool drawAsPolygon = false;
if ( mParentTool->layer() )
if ( QgsMapLayer* layer = mParentTool->layer() )
{
const QgsCoordinateReferenceSystem layerCrs = mParentTool->layer()->crs();
const QgsCoordinateReferenceSystem layerCrs = layer->crs();
const QgsCoordinateReferenceSystem mapCrs = mParentTool->canvas()->mapSettings().destinationCrs();
bool drawAsPolygon = layerCrs != mapCrs;
drawAsPolygon = layerCrs != mapCrs;
}
if ( drawAsPolygon )
{
Expand Down

0 comments on commit 4ee3c8b

Please sign in to comment.