Skip to content
Permalink
Browse files
Better snapping behavior
  • Loading branch information
leyan committed May 21, 2014
1 parent 2377f17 commit 4768a8fdb6b595ca7fa903d41c359dd2bc4d0952
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/app/qgsmaptoolsplitfeatures.cpp
  2. +2 −2 src/app/qgsmaptoolsplitparts.cpp
@@ -58,10 +58,10 @@ void QgsMapToolSplitFeatures::canvasReleaseEvent( QMouseEvent * e )
{
QList<QgsSnappingResult> snapResults;

//If we snap the first point on a line layer, we directly split the feature at this point
//If we snap the first point on a vertex of a line layer, we directly split the feature at this point
if ( vlayer->geometryType() == QGis::Line && points().isEmpty() )
{
if ( mSnapper.snapToBackgroundLayers( e->pos(), snapResults ) == 0 )
if ( mSnapper.snapToCurrentLayer( e->pos(), snapResults, QgsSnapper::SnapToVertex ) == 0 )
{
if ( snapResults.size() > 0 )
{
@@ -56,10 +56,10 @@ void QgsMapToolSplitParts::canvasReleaseEvent( QMouseEvent * e )
{
QList<QgsSnappingResult> snapResults;

//If we snap the first point on a line layer, we directly split the feature at this point
//If we snap the first point on a vertex of a line layer, we directly split the feature at this point
if ( vlayer->geometryType() == QGis::Line && points().isEmpty() )
{
if ( mSnapper.snapToBackgroundLayers( e->pos(), snapResults ) == 0 )
if ( mSnapper.snapToCurrentLayer( e->pos(), snapResults, QgsSnapper::SnapToVertex ) == 0 )
{
if ( snapResults.size() > 0 )
{

0 comments on commit 4768a8f

Please sign in to comment.