Keep Z/M information when digitizing from a snapped point (fixes #14318)

This commit is contained in:
Hugo Mercier 2016-02-17 14:44:04 +01:00
parent 22b27c5fdc
commit bcded3c2d4

View File

@ -376,13 +376,14 @@ int QgsMapToolCapture::fetchLayerPoint( QgsPointLocator::Match match , QgsPointV
{
QgsFeature f;
QgsFeatureRequest request;
QgsPoint foundPoint;
request.setFilterFid( match.featureId() );
bool fetched = match.layer()->getFeatures( request ).nextFeature( f );
if ( fetched )
{
foundPoint = f.geometry()->vertexAt( match.vertexIndex() );
layerPoint = QgsPointV2( foundPoint.x(), foundPoint.y() );
QgsVertexId vId;
if ( !f.geometry()->vertexIdFromVertexNr( match.vertexIndex(), vId ) )
return 2;
layerPoint = f.geometry()->geometry()->vertexAt( vId );
return 0;
}
else