Skip to content

Commit

Permalink
Fix composer snap lines disappearing when new lines added
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson authored and mhugent committed Oct 29, 2013
1 parent 3dfb9ff commit 616588e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/composer/qgscomposition.cpp
Expand Up @@ -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 )
{
Expand Down

0 comments on commit 616588e

Please sign in to comment.