mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-30 00:29:39 -05:00
Disable Z interpolation in some cases fix #46128
This commit is contained in:
parent
c3df08492d
commit
2cf8189f89
@ -914,14 +914,19 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent *e )
|
||||
* a Z value.
|
||||
* To get the value we use the snapPoint method. However, we only apply it
|
||||
* when the snapped point corresponds to the constrained point or on an edge
|
||||
* if the topological editing is activated.
|
||||
* if the topological editing is activated. Also, we don't apply it if
|
||||
* the point is not linked to a layer.
|
||||
*/
|
||||
e->setMapPoint( point );
|
||||
mSnapMatch = context.snappingUtils->snapToMap( point, nullptr, true );
|
||||
if ( ( ( mSnapMatch.hasVertex() || mSnapMatch.hasLineEndpoint() ) && ( point == mSnapMatch.point() ) ) || ( mSnapMatch.hasEdge() && QgsProject::instance()->topologicalEditing() ) )
|
||||
if ( mSnapMatch.layer() )
|
||||
{
|
||||
e->snapPoint();
|
||||
point = mSnapMatch.interpolatedPoint( mMapCanvas->mapSettings().destinationCrs() );
|
||||
if ( ( ( mSnapMatch.hasVertex() || mSnapMatch.hasLineEndpoint() ) && ( point == mSnapMatch.point() ) )
|
||||
|| ( mSnapMatch.hasEdge() && QgsProject::instance()->topologicalEditing() ) )
|
||||
{
|
||||
e->snapPoint();
|
||||
point = mSnapMatch.interpolatedPoint( mMapCanvas->mapSettings().destinationCrs() );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user