mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Keep Z/M information when digitizing from a snapped point (fixes #14318)
This commit is contained in:
parent
22b27c5fdc
commit
bcded3c2d4
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user