Skip to content

Commit

Permalink
Concat successive if
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti committed Oct 3, 2017
1 parent 30d9ad8 commit f20041d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/app/qgsmaptoolcircle2points.cpp
Expand Up @@ -35,13 +35,10 @@ void QgsMapToolCircle2Points::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
{
mPoints.append( mapPoint );

if ( !mPoints.isEmpty() )
if ( !mPoints.isEmpty() && !mTempRubberBand )
{
if ( !mTempRubberBand )
{
mTempRubberBand = createGeometryRubberBand( ( mode() == CapturePolygon ) ? QgsWkbTypes::PolygonGeometry : QgsWkbTypes::LineGeometry, true );
mTempRubberBand->show();
}
mTempRubberBand = createGeometryRubberBand( ( mode() == CapturePolygon ) ? QgsWkbTypes::PolygonGeometry : QgsWkbTypes::LineGeometry, true );
mTempRubberBand->show();
}
}
else if ( e->button() == Qt::RightButton )
Expand Down

0 comments on commit f20041d

Please sign in to comment.