Skip to content

Commit

Permalink
[cad] Fix invalid coordinates when x/y snapping is enabled and
Browse files Browse the repository at this point in the history
subsequent segments are parallel
  • Loading branch information
nyalldawson committed May 2, 2016
1 parent 3a543e4 commit 90d116c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgsadvanceddigitizingdockwidget.cpp
Expand Up @@ -677,7 +677,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent* e )
}
else if ( mXConstraint->isLocked() )
{
if ( cosa == 0 )
if ( qgsDoubleNear( cosa, 0.0 ) )
{
res = false;
}
Expand All @@ -693,7 +693,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 90d116c

Please sign in to comment.