Skip to content
Permalink
Browse files
CAD dock: fix a typo -> enable new snapping option
When X or Y is locked and user has mouse on top of a segment, CAD dock widget
will snap at the intersection of the segment and the axis.
  • Loading branch information
wonder-sk committed Sep 11, 2017
1 parent 494fa15 commit 6772541
Showing 1 changed file with 2 additions and 2 deletions.
@@ -593,7 +593,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent *e )
{
point.setX( previousPt.x() + mXConstraint->value() );
}
if ( !mSnappedSegment.isEmpty() && !mXConstraint->isLocked() )
if ( !mSnappedSegment.isEmpty() && !mYConstraint->isLocked() )
{
// intersect with snapped segment line at X ccordinate
const double dx = mSnappedSegment.at( 1 ).x() - mSnappedSegment.at( 0 ).x();
@@ -620,7 +620,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent *e )
{
point.setY( previousPt.y() + mYConstraint->value() );
}
if ( !mSnappedSegment.isEmpty() && !mYConstraint->isLocked() )
if ( !mSnappedSegment.isEmpty() && !mXConstraint->isLocked() )
{
// intersect with snapped segment line at Y ccordinate
const double dy = mSnappedSegment.at( 1 ).y() - mSnappedSegment.at( 0 ).y();

1 comment on commit 6772541

@3nids
Copy link
Member

@3nids 3nids commented on 6772541 Sep 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backported to 2.18

Please sign in to comment.