mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Fixes addFeature map tool when snapped layer has ZM support
This commit is contained in:
parent
a0c3844574
commit
abdaccc2d1
@ -399,7 +399,20 @@ int QgsMapToolCapture::fetchLayerPoint( const QgsPointLocator::Match &match, Qgs
|
||||
QgsVertexId vId;
|
||||
if ( !f.geometry().vertexIdFromVertexNr( match.vertexIndex(), vId ) )
|
||||
return 2;
|
||||
|
||||
layerPoint = f.geometry().constGet()->vertexAt( vId );
|
||||
|
||||
// ZM support depends on the target layer
|
||||
if ( layerPoint.is3D() && !QgsWkbTypes::hasZ( vlayer->wkbType() ) )
|
||||
{
|
||||
layerPoint.dropZValue();
|
||||
}
|
||||
|
||||
if ( layerPoint.isMeasure() && !QgsWkbTypes::hasM( vlayer->wkbType() ) )
|
||||
{
|
||||
layerPoint.dropMValue();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user