mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-03 00:02:25 -05:00
Needs to snap point too when CadDockWidget is enabled. Fixes #18138
This commit is contained in:
parent
857fe53773
commit
2a2b7a6532
@ -555,6 +555,8 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent *e )
|
||||
|
||||
mSnapMatch = context.snappingUtils->snapToMap( point );
|
||||
|
||||
mSnappedToVertex = mSnapMatch.hasVertex();
|
||||
|
||||
// update the point list
|
||||
updateCurrentPoint( point );
|
||||
|
||||
|
@ -34,6 +34,11 @@ void QgsMapToolAdvancedDigitizing::canvasPressEvent( QgsMapMouseEvent *e )
|
||||
{
|
||||
mCadDockWidget->applyConstraints( e ); // updates event's map point
|
||||
|
||||
if ( mCadDockWidget->mapPointMatch().hasVertex() )
|
||||
{
|
||||
e->snapPoint();
|
||||
}
|
||||
|
||||
if ( mCadDockWidget->constructionMode() )
|
||||
return; // decided to eat the event and not pass it to the map tool (construction mode)
|
||||
}
|
||||
@ -73,6 +78,11 @@ void QgsMapToolAdvancedDigitizing::canvasReleaseEvent( QgsMapMouseEvent *e )
|
||||
|
||||
mCadDockWidget->releaseLocks( false );
|
||||
|
||||
if ( mCadDockWidget->mapPointMatch().hasVertex() )
|
||||
{
|
||||
e->snapPoint();
|
||||
}
|
||||
|
||||
if ( mCadDockWidget->constructionMode() )
|
||||
return; // decided to eat the event and not pass it to the map tool (construction mode)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user