Skip to content

Commit

Permalink
Update src/app/maptools/qgsmaptoolshapecircleabstract.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 6, 2023
1 parent bf9f991 commit fda3e1d
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 fda3e1d

Please sign in to comment.