[FEATURE] vertextool : chained add vertex at endpoint

This makes it possible to digitizle multiple points at
once when extending a line feature with the vertex tool
This commit is contained in:
olivierdalang 2019-05-09 14:53:50 +02:00
parent fe39b26684
commit 0b2a9258d7

View File

@ -2040,6 +2040,18 @@ void QgsVertexTool::moveVertex( const QgsPointXY &mapPoint, const QgsPointLocato
setHighlightedVertices( mSelectedVertices ); // update positions of existing highlighted vertices setHighlightedVertices( mSelectedVertices ); // update positions of existing highlighted vertices
setHighlightedVerticesVisible( true ); // time to show highlighted vertices again 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 );
}
} }