Skip to content

Commit

Permalink
Fix snapping configuration to snap only to editable layers
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Apr 6, 2017
1 parent efbfe3b commit 9619d5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/nodetool/qgsnodetool2.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 9619d5e

Please sign in to comment.