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 6772541720bb798406a949fb27df78f08c431baf
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/gui/qgsadvanceddigitizingdockwidget.cpp
@@ -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

This comment has been minimized.

Copy link
Member

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

backported to 2.18

Please sign in to comment.
You can’t perform that action at this time.