Skip to content

Commit 9619d5e

Browse files
committedApr 6, 2017
Fix snapping configuration to snap only to editable layers
1 parent efbfe3b commit 9619d5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/app/nodetool/qgsnodetool2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,11 +601,11 @@ QgsPointLocator::Match QgsNodeTool2::snapToEditableLayer( QgsMapMouseEvent *e )
601601
Q_FOREACH ( QgsMapLayer *layer, canvas()->layers() )
602602
{
603603
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( layer );
604-
if ( !vlayer || !vlayer->isEditable() )
604+
if ( !vlayer )
605605
continue;
606606

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.