Skip to content
Permalink
Browse files

Fixed snapping to background layers if there's a layer that doesn't e…

…xist. Fixes #2261

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12515 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Dec 19, 2009
1 parent 6a314a5 commit 06cbd6db1919ca459225ac1a42db8e8b7e620707
Showing with 7 additions and 8 deletions.
  1. +7 −8 src/gui/qgsmapcanvassnapper.cpp
@@ -185,14 +185,13 @@ int QgsMapCanvasSnapper::snapToBackgroundLayers( const QPoint& p, QList<QgsSnapp

//layer
layer = QgsMapLayerRegistry::instance()->mapLayer( *layerIt );
if ( layer )
{
vlayer = qobject_cast<QgsVectorLayer *>( layer );
if ( vlayer )
{
snapLayer.mLayer = vlayer;
}
}
if ( layer == NULL )
continue;
vlayer = qobject_cast<QgsVectorLayer *>( layer );
if ( vlayer == NULL )
continue;

snapLayer.mLayer = vlayer;

//tolerance
snapLayer.mTolerance = tolIt->toDouble();

0 comments on commit 06cbd6d

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