Skip to content

Commit 6772541

Browse files
committed
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.
1 parent 494fa15 commit 6772541

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gui/qgsadvanceddigitizingdockwidget.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent *e )
593593
{
594594
point.setX( previousPt.x() + mXConstraint->value() );
595595
}
596-
if ( !mSnappedSegment.isEmpty() && !mXConstraint->isLocked() )
596+
if ( !mSnappedSegment.isEmpty() && !mYConstraint->isLocked() )
597597
{
598598
// intersect with snapped segment line at X ccordinate
599599
const double dx = mSnappedSegment.at( 1 ).x() - mSnappedSegment.at( 0 ).x();
@@ -620,7 +620,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent *e )
620620
{
621621
point.setY( previousPt.y() + mYConstraint->value() );
622622
}
623-
if ( !mSnappedSegment.isEmpty() && !mYConstraint->isLocked() )
623+
if ( !mSnappedSegment.isEmpty() && !mXConstraint->isLocked() )
624624
{
625625
// intersect with snapped segment line at Y ccordinate
626626
const double dy = mSnappedSegment.at( 1 ).y() - mSnappedSegment.at( 0 ).y();

0 commit comments

Comments
 (0)