Skip to content

Commit 8eb8494

Browse files
committedDec 21, 2015
initialize temporary rubberband for circular string tools
(temporary rubberband still not used)
1 parent e0b14a5 commit 8eb8494

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
 

‎src/app/qgsmaptooladdcircularstring.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,16 @@ void QgsMapToolAddCircularString::activate()
144144
QgsPointV2 endPointLayerCoord = curve->endPoint();
145145
QgsPoint mapPoint = toMapCoordinates( mCanvas->currentLayer(), QgsPoint( endPointLayerCoord.x(), endPointLayerCoord.y() ) );
146146
mPoints.append( QgsPointV2( mapPoint ) );
147+
if ( !mTempRubberBand )
148+
{
149+
mTempRubberBand = createGeometryRubberBand(( mode() == CapturePolygon ) ? QGis::Polygon : QGis::Line, true );
150+
mTempRubberBand->show();
151+
}
152+
QgsCircularStringV2* c = new QgsCircularStringV2();
153+
QList< QgsPointV2 > rubberBandPoints = mPoints;
154+
rubberBandPoints.append( QgsPointV2( mapPoint ) );
155+
c->setPoints( rubberBandPoints );
156+
mTempRubberBand->setGeometry( c );
147157
}
148158
}
149159
}

0 commit comments

Comments
 (0)
Please sign in to comment.