Fix invalid rubber band when digitising polygon and layer CRS

is not the same as map CRS (fix #14117)
This commit is contained in:
Nyall Dawson 2016-01-19 10:50:17 +11:00
parent 7e90d5773f
commit 23fc3cf9cc

View File

@ -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