Skip to content
Permalink
Browse files

Fix composer snap lines disappearing when new lines added

  • Loading branch information
nyalldawson authored and mhugent committed Oct 29, 2013
1 parent 3dfb9ff commit 616588e60826e4e3f1b15fc64031ae321c786b6d
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/core/composer/qgscomposition.cpp
@@ -1466,11 +1466,15 @@ QGraphicsLineItem* QgsComposition::nearestSnapLine( bool horizontal, double x, d
currentYCoord = ( *it )->line().y1();
currentSqrDist = ( y - currentYCoord ) * ( y - currentYCoord );
}
else if ( !itemHorizontal )
else if ( !horizontal && !itemHorizontal )
{
currentXCoord = ( *it )->line().x1();
currentSqrDist = ( x - currentXCoord ) * ( x - currentXCoord );
}
else
{
continue;
}

if ( currentSqrDist < minSqrDist && currentSqrDist < sqrTolerance )
{

0 comments on commit 616588e

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