Skip to content

Commit

Permalink
Do not show crs validation dialog for extra snapping layer
Browse files Browse the repository at this point in the history
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 ebc9c31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/qgsmaptoolcapture.cpp
Expand Up @@ -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 );
mExtraSnapLayer->startEditing();
QgsFeature f;
mExtraSnapLayer->addFeature( f );
Expand Down

0 comments on commit ebc9c31

Please sign in to comment.