Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[cad] Fix invalid coordinates when x/y snapping is enabled and
subsequent segments are parallel

(cherry-picked from 90d116c)
  • Loading branch information
nyalldawson committed May 16, 2016
1 parent 82a4b4d commit aa6347e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgsadvanceddigitizingdockwidget.cpp
Expand Up @@ -574,7 +574,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent* e )
}
else if ( mXConstraint->isLocked() )
{
if ( cosa == 0 )
if ( qgsDoubleNear( cosa, 0.0 ) )
{
res = false;
}
Expand All @@ -590,7 +590,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent* e )
}
else if ( mYConstraint->isLocked() )
{
if ( sina == 0 )
if ( qgsDoubleNear( sina, 0.0 ) )
{
res = false;
}
Expand Down

0 comments on commit aa6347e

Please sign in to comment.