Skip to content

Commit f5b38fe

Browse files
committedJun 8, 2017
Node tool: add default Z value to new vertices in 3D geometries (fixes #16240)
1 parent bdd8168 commit f5b38fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/app/nodetool/qgsnodetool.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,11 @@ void QgsNodeTool::moveVertex( const QgsPointXY &mapPoint, const QgsPointLocator:
13901390
if ( addingAtEndpoint && vid.vertex != 0 ) // appending?
13911391
vid.vertex++;
13921392

1393-
if ( !geomTmp->insertVertex( vid, QgsPoint( layerPoint ) ) )
1393+
QgsPoint pt( layerPoint );
1394+
if ( QgsWkbTypes::hasZ( dragLayer->wkbType() ) )
1395+
pt.addZValue( defaultZValue() );
1396+
1397+
if ( !geomTmp->insertVertex( vid, pt ) )
13941398
{
13951399
QgsDebugMsg( "append vertex failed!" );
13961400
return;

0 commit comments

Comments
 (0)
Please sign in to comment.