Skip to content
Permalink
Browse files

add default z value instead of NaN when line/polygon capture a 2D vertex

  • Loading branch information
lbartoletti committed Jan 7, 2020
1 parent 3f9b53e commit 12ba65d7bb557e0ef8cc886dea1a09fc4c5b102a
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/gui/qgsmaptoolcapture.cpp
@@ -410,6 +410,10 @@ int QgsMapToolCapture::fetchLayerPoint( const QgsPointLocator::Match &match, Qgs
else
{
layerPoint = geom.constGet()->vertexAt( vId );
if ( QgsWkbTypes::hasZ( vlayer->wkbType() ) && !layerPoint.is3D() )
layerPoint.addZValue( defaultZValue() );
if ( QgsWkbTypes::hasM( vlayer->wkbType() ) && !layerPoint.isMeasure() )
layerPoint.addMValue( 0.0 );
}

// ZM support depends on the target layer

0 comments on commit 12ba65d

Please sign in to comment.
You can’t perform that action at this time.