Skip to content

Commit 43520c5

Browse files
committed
#9094: '+' and '-' keys work as selector nodes
'+' and '-' select next and previous to current active node respectively. This commit is for demo proposes.
1 parent 5bda2df commit 43520c5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/app/nodetool/qgsmaptoolnodetool.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,16 @@ void QgsMapToolNodeTool::keyReleaseEvent( QKeyEvent* e )
720720
safeSelectVertex( firstSelectedIndex );
721721
mCanvas->refresh();
722722
}
723+
else
724+
if ( mSelectedFeature && ( e->key() == Qt::Key_Minus || e->key() == Qt::Key_Plus ) )
725+
{
726+
int firstSelectedIndex = firstSelectedVertex();
727+
if ( firstSelectedIndex == -1) return;
728+
729+
mSelectedFeature->deselectAllVertexes();
730+
safeSelectVertex( firstSelectedIndex + ( (e->key() == Qt::Key_Minus) ? -1 : +1 ) );
731+
mCanvas->refresh();
732+
}
723733
}
724734

725735
QgsRubberBand* QgsMapToolNodeTool::createRubberBandMarker( QgsPoint center, QgsVectorLayer* vlayer )

0 commit comments

Comments
 (0)