Skip to content

Commit aa6347e

Browse files
committedMay 16, 2016
[cad] Fix invalid coordinates when x/y snapping is enabled and
subsequent segments are parallel (cherry-picked from 90d116c)
1 parent 82a4b4d commit aa6347e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/gui/qgsadvanceddigitizingdockwidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent* e )
574574
}
575575
else if ( mXConstraint->isLocked() )
576576
{
577-
if ( cosa == 0 )
577+
if ( qgsDoubleNear( cosa, 0.0 ) )
578578
{
579579
res = false;
580580
}
@@ -590,7 +590,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent* e )
590590
}
591591
else if ( mYConstraint->isLocked() )
592592
{
593-
if ( sina == 0 )
593+
if ( qgsDoubleNear( sina, 0.0 ) )
594594
{
595595
res = false;
596596
}

0 commit comments

Comments
 (0)
Please sign in to comment.