Skip to content

Commit 0b2a925

Browse files
committedMay 9, 2019
[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
1 parent fe39b26 commit 0b2a925

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎src/app/vertextool/qgsvertextool.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,6 +2040,18 @@ void QgsVertexTool::moveVertex( const QgsPointXY &mapPoint, const QgsPointLocato
20402040

20412041
setHighlightedVertices( mSelectedVertices ); // update positions of existing highlighted vertices
20422042
setHighlightedVerticesVisible( true ); // time to show highlighted vertices again
2043+
2044+
// restart startDraggingAddVertexAtEndpoint right after it finishes
2045+
if ( addingAtEndpoint )
2046+
{
2047+
if ( mMouseAtEndpoint->vertexId != 0 )
2048+
{
2049+
// If we were adding at the end of the featue, we need to update the index
2050+
mMouseAtEndpoint.reset( new Vertex( mMouseAtEndpoint->layer, mMouseAtEndpoint->fid, mMouseAtEndpoint->vertexId + 1 ) );
2051+
}
2052+
// And then we just restart the drag
2053+
startDraggingAddVertexAtEndpoint( mapPoint );
2054+
}
20432055
}
20442056

20452057

0 commit comments

Comments
 (0)
Please sign in to comment.