mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -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;
|
QgsFeature f;
|
||||||
QgsFeatureRequest request;
|
QgsFeatureRequest request;
|
||||||
QgsPoint foundPoint;
|
|
||||||
request.setFilterFid( match.featureId() );
|
request.setFilterFid( match.featureId() );
|
||||||
bool fetched = match.layer()->getFeatures( request ).nextFeature( f );
|
bool fetched = match.layer()->getFeatures( request ).nextFeature( f );
|
||||||
if ( fetched )
|
if ( fetched )
|
||||||
{
|
{
|
||||||
foundPoint = f.geometry()->vertexAt( match.vertexIndex() );
|
QgsVertexId vId;
|
||||||
layerPoint = QgsPointV2( foundPoint.x(), foundPoint.y() );
|
if ( !f.geometry()->vertexIdFromVertexNr( match.vertexIndex(), vId ) )
|
||||||
|
return 2;
|
||||||
|
layerPoint = f.geometry()->geometry()->vertexAt( vId );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user