fix Z interpolation for Middle of Segment

This commit is contained in:
Loïc Bartoletti 2020-10-05 15:56:33 +02:00
parent 3eec50ea62
commit 430031f23f

View File

@ -2081,7 +2081,7 @@ void QgsVertexTool::moveVertex( const QgsPointXY &mapPoint, const QgsPointLocato
QgsPoint layerPoint = matchToLayerPoint( dragLayer, mapPoint, mapPointMatch );
// needed to get Z value
if ( mapPointMatch && mapPointMatch->layer() && QgsWkbTypes::hasZ( mapPointMatch->layer()->wkbType() ) && mapPointMatch->hasEdge() )
if ( mapPointMatch && mapPointMatch->layer() && QgsWkbTypes::hasZ( mapPointMatch->layer()->wkbType() ) && ( mapPointMatch->hasEdge() || mapPointMatch->hasMiddleSegment() ) )
layerPoint = mapPointMatch->interpolatedPoint();
QgsVertexId vid;