Skip to content

Commit 23fc3cf

Browse files
committedJan 18, 2016
Fix invalid rubber band when digitising polygon and layer CRS
is not the same as map CRS (fix #14117)
1 parent 7e90d57 commit 23fc3cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/gui/qgsmaptoolcapture.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ void QgsMapToolCapture::cadCanvasMoveEvent( QgsMapMouseEvent * e )
302302
if ( mCaptureMode == CapturePolygon )
303303
mTempRubberBand->addPoint( *mRubberBand->getPoint( 0, 0 ), false );
304304
QgsPointV2 pt = mCaptureCurve.endPoint();
305-
mTempRubberBand->addPoint( QgsPoint( pt.x(), pt.y() ) );
305+
QgsPoint mapPt = toMapCoordinates( qobject_cast<QgsVectorLayer *>( mCanvas->currentLayer() ), QgsPoint( pt.x(), pt.y() ) );
306+
mTempRubberBand->addPoint( mapPt );
306307
mTempRubberBand->addPoint( point );
307308
}
308309
else

0 commit comments

Comments
 (0)
Please sign in to comment.