Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Node tool: add default Z value to new vertices in 3D geometries (fixes
  • Loading branch information
wonder-sk committed Jun 8, 2017
1 parent bdd8168 commit f5b38fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/nodetool/qgsnodetool.cpp
Expand Up @@ -1390,7 +1390,11 @@ void QgsNodeTool::moveVertex( const QgsPointXY &mapPoint, const QgsPointLocator:
if ( addingAtEndpoint && vid.vertex != 0 ) // appending?
vid.vertex++;

if ( !geomTmp->insertVertex( vid, QgsPoint( layerPoint ) ) )
QgsPoint pt( layerPoint );
if ( QgsWkbTypes::hasZ( dragLayer->wkbType() ) )
pt.addZValue( defaultZValue() );

if ( !geomTmp->insertVertex( vid, pt ) )
{
QgsDebugMsg( "append vertex failed!" );
return;
Expand Down

0 comments on commit f5b38fe

Please sign in to comment.