Skip to content
Permalink
Browse files
Fix snapping configuration to snap only to editable layers
  • Loading branch information
wonder-sk committed Apr 6, 2017
1 parent efbfe3b commit 9619d5e75d874e77f6c6592a8ccd1e92df2ab04f
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/app/nodetool/qgsnodetool2.cpp
@@ -601,11 +601,11 @@ QgsPointLocator::Match QgsNodeTool2::snapToEditableLayer( QgsMapMouseEvent *e )
Q_FOREACH ( QgsMapLayer *layer, canvas()->layers() )
{
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( layer );
if ( !vlayer || !vlayer->isEditable() )
if ( !vlayer )
continue;

config.setIndividualLayerSettings( vlayer, QgsSnappingConfig::IndividualLayerSettings(
true, QgsSnappingConfig::VertexAndSegment, tol, QgsTolerance::ProjectUnits ) );
vlayer->isEditable(), QgsSnappingConfig::VertexAndSegment, tol, QgsTolerance::ProjectUnits ) );
}

QgsSnappingUtils *snapUtils = canvas()->snappingUtils();

0 comments on commit 9619d5e

Please sign in to comment.