Skip to content
Permalink
Browse files

show snap indicators for snaps with constraints

  • Loading branch information
olivierdalang committed May 21, 2020
1 parent 2942312 commit 66bfde66d56722434a7ade48fa60d0612753299c
Showing with 4 additions and 7 deletions.
  1. +4 −7 src/gui/qgsadvanceddigitizingdockwidget.cpp
@@ -667,14 +667,9 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent *e )
}
}

// set the point coordinates in the map event
e->setMapPoint( point );

mSnapMatch = context.snappingUtils->snapToMap( point, nullptr, true );

if ( mSnapMatch.isValid() )
if ( output.snapMatch.isValid() )
{
mSnapIndicator->setMatch( mSnapMatch );
mSnapIndicator->setMatch( output.snapMatch );
mSnapIndicator->setVisible( true );
}
else
@@ -690,6 +685,8 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent *e )
* when the snapped point corresponds to the constrained point or on an edge
* if the topological editing is activated.
*/
e->setMapPoint( point );
mSnapMatch = context.snappingUtils->snapToMap( point, nullptr, true );
if ( ( mSnapMatch.hasVertex() && ( point == mSnapMatch.point() ) ) || ( mSnapMatch.hasEdge() && QgsProject::instance()->topologicalEditing() ) )
{
e->snapPoint();

0 comments on commit 66bfde6

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