Skip to content
Browse files

Do not show crs validation dialog for extra snapping layer

It is set to an invalid CRS (== map canvas CRS) on purpose

Fixes #37045
  • Loading branch information
m-kuhn authored and nyalldawson committed Jun 8, 2020
1 parent 5b19deb commit ebc9c3181e87650abe611000feaf6f566df5a221
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/gui/qgsmaptoolcapture.cpp
@@ -51,7 +51,9 @@ QgsMapToolCapture::QgsMapToolCapture( QgsMapCanvas *canvas, QgsAdvancedDigitizin
connect( canvas, &QgsMapCanvas::currentLayerChanged,
this, &QgsMapToolCapture::currentLayerChanged );

mExtraSnapLayer = new QgsVectorLayer( "LineString?crs=0", "extra snap", "memory" );
QgsVectorLayer::LayerOptions layerOptions;
layerOptions.skipCrsValidation = true;
mExtraSnapLayer = new QgsVectorLayer( "LineString?crs=0", "extra snap", "memory", layerOptions );
QgsFeature f;
mExtraSnapLayer->addFeature( f );

0 comments on commit ebc9c31

Please sign in to comment.
You can’t perform that action at this time.