Skip to content

Commit

Permalink
initialize temporary rubberband for circular string tools
Browse files Browse the repository at this point in the history
(temporary rubberband still not used)
  • Loading branch information
SebDieBln committed Dec 21, 2015
1 parent e0b14a5 commit 8eb8494
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/app/qgsmaptooladdcircularstring.cpp
Expand Up @@ -144,6 +144,16 @@ void QgsMapToolAddCircularString::activate()
QgsPointV2 endPointLayerCoord = curve->endPoint();
QgsPoint mapPoint = toMapCoordinates( mCanvas->currentLayer(), QgsPoint( endPointLayerCoord.x(), endPointLayerCoord.y() ) );
mPoints.append( QgsPointV2( mapPoint ) );
if ( !mTempRubberBand )
{
mTempRubberBand = createGeometryRubberBand(( mode() == CapturePolygon ) ? QGis::Polygon : QGis::Line, true );
mTempRubberBand->show();
}
QgsCircularStringV2* c = new QgsCircularStringV2();
QList< QgsPointV2 > rubberBandPoints = mPoints;
rubberBandPoints.append( QgsPointV2( mapPoint ) );
c->setPoints( rubberBandPoints );
mTempRubberBand->setGeometry( c );
}
}
}
Expand Down

0 comments on commit 8eb8494

Please sign in to comment.