Skip to content

Commit

Permalink
[FEATURE] vertextool : chained add vertex at endpoint
Browse files Browse the repository at this point in the history
This makes it possible to digitizle multiple points at
once when extending a line feature with the vertex tool
  • Loading branch information
olivierdalang committed May 9, 2019
1 parent fe39b26 commit 0b2a925
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app/vertextool/qgsvertextool.cpp
Expand Up @@ -2040,6 +2040,18 @@ void QgsVertexTool::moveVertex( const QgsPointXY &mapPoint, const QgsPointLocato

setHighlightedVertices( mSelectedVertices ); // update positions of existing highlighted vertices
setHighlightedVerticesVisible( true ); // time to show highlighted vertices again

// restart startDraggingAddVertexAtEndpoint right after it finishes
if ( addingAtEndpoint )
{
if ( mMouseAtEndpoint->vertexId != 0 )
{
// If we were adding at the end of the featue, we need to update the index
mMouseAtEndpoint.reset( new Vertex( mMouseAtEndpoint->layer, mMouseAtEndpoint->fid, mMouseAtEndpoint->vertexId + 1 ) );
}
// And then we just restart the drag
startDraggingAddVertexAtEndpoint( mapPoint );
}
}


Expand Down

0 comments on commit 0b2a925

Please sign in to comment.