Skip to content

Commit 66bfde6

Browse files
committedMay 21, 2020
show snap indicators for snaps with constraints
1 parent 2942312 commit 66bfde6

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed
 

‎src/gui/qgsadvanceddigitizingdockwidget.cpp‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -667,14 +667,9 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent *e )
667667
}
668668
}
669669

670-
// set the point coordinates in the map event
671-
e->setMapPoint( point );
672-
673-
mSnapMatch = context.snappingUtils->snapToMap( point, nullptr, true );
674-
675-
if ( mSnapMatch.isValid() )
670+
if ( output.snapMatch.isValid() )
676671
{
677-
mSnapIndicator->setMatch( mSnapMatch );
672+
mSnapIndicator->setMatch( output.snapMatch );
678673
mSnapIndicator->setVisible( true );
679674
}
680675
else
@@ -690,6 +685,8 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent *e )
690685
* when the snapped point corresponds to the constrained point or on an edge
691686
* if the topological editing is activated.
692687
*/
688+
e->setMapPoint( point );
689+
mSnapMatch = context.snappingUtils->snapToMap( point, nullptr, true );
693690
if ( ( mSnapMatch.hasVertex() && ( point == mSnapMatch.point() ) ) || ( mSnapMatch.hasEdge() && QgsProject::instance()->topologicalEditing() ) )
694691
{
695692
e->snapPoint();

0 commit comments

Comments
 (0)
Please sign in to comment.