Skip to content

Commit

Permalink
Fix invalid rubber band when digitising polygon and layer CRS
Browse files Browse the repository at this point in the history
is not the same as map CRS (fix #14117)
  • Loading branch information
nyalldawson committed Jan 18, 2016
1 parent 7e90d57 commit 23fc3cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/qgsmaptoolcapture.cpp
Expand Up @@ -302,7 +302,8 @@ void QgsMapToolCapture::cadCanvasMoveEvent( QgsMapMouseEvent * e )
if ( mCaptureMode == CapturePolygon )
mTempRubberBand->addPoint( *mRubberBand->getPoint( 0, 0 ), false );
QgsPointV2 pt = mCaptureCurve.endPoint();
mTempRubberBand->addPoint( QgsPoint( pt.x(), pt.y() ) );
QgsPoint mapPt = toMapCoordinates( qobject_cast<QgsVectorLayer *>( mCanvas->currentLayer() ), QgsPoint( pt.x(), pt.y() ) );
mTempRubberBand->addPoint( mapPt );
mTempRubberBand->addPoint( point );
}
else
Expand Down

0 comments on commit 23fc3cf

Please sign in to comment.