Skip to content
Permalink
Browse files

When deleting nodes from the end of a linestring, select the

final node following a delete rather than reverting to the first
node.

Improves workflow when deleting sequential nodes from end of
lines.
  • Loading branch information
nyalldawson committed Oct 29, 2015
1 parent ba1de8b commit bcb7e44174b599f307022265eeae5dc622f859ce
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/app/nodetool/qgsmaptoolnodetool.cpp
@@ -546,7 +546,14 @@ void QgsMapToolNodeTool::keyPressEvent( QKeyEvent* e )
}
else
{
safeSelectVertex( firstSelectedIndex );
int nextVertexToSelect = firstSelectedIndex;
if ( mSelectedFeature->geometry()->type() == QGis::Line )
{
// for lines we don't wrap around vertex selection when deleting nodes from end of line
nextVertexToSelect = qMin( nextVertexToSelect, mSelectedFeature->geometry()->geometry()->nCoordinates() - 1 );
}

safeSelectVertex( nextVertexToSelect );
}
mCanvas->refresh();

0 comments on commit bcb7e44

Please sign in to comment.
You can’t perform that action at this time.