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@12515 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Dec 19, 2009
1 parent 4e0bae4 commit 6f23f9e80cb70a5621d451065f839774457bfab6
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 6f23f9e

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