Skip to content

Commit

Permalink
Keep Z/M information when digitizing from a snapped point (fixes #14318)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Mercier committed Feb 18, 2016
1 parent 22b27c5 commit bcded3c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/gui/qgsmaptoolcapture.cpp
Expand Up @@ -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
Expand Down

0 comments on commit bcded3c

Please sign in to comment.