Skip to content
Permalink
Browse files

Merge pull request #1048 from ahuarte47/Issue_9094-revival

#9094-R: Use ',' and '.' keys similar to '<' and '>' keys in QgsMapToolNodeTool
  • Loading branch information
NathanW2 committed Jan 2, 2014
2 parents 9ef3f86 + 373adbd commit bb1639cf1494749d6e875a9192b8e825618cba6a
Showing with 18 additions and 8 deletions.
  1. +18 −8 src/app/nodetool/qgsmaptoolnodetool.cpp
@@ -733,15 +733,25 @@ void QgsMapToolNodeTool::keyPressEvent( QKeyEvent* e )
e->ignore();
}
else
if ( mSelectedFeature && ( e->key() == Qt::Key_Less || e->key() == Qt::Key_Greater ) )
{
int firstSelectedIndex = firstSelectedVertex();
if ( firstSelectedIndex == -1 ) return;
if ( mSelectedFeature && ( e->key() == Qt::Key_Less || e->key() == Qt::Key_Comma ) )
{
int firstSelectedIndex = firstSelectedVertex();
if ( firstSelectedIndex == -1) return;

mSelectedFeature->deselectAllVertexes();
safeSelectVertex( firstSelectedIndex + (( e->key() == Qt::Key_Less ) ? -1 : + 1 ) );
mCanvas->refresh();
}
mSelectedFeature->deselectAllVertexes();
safeSelectVertex( firstSelectedIndex - 1 );
mCanvas->refresh();
}
else
if ( mSelectedFeature && ( e->key() == Qt::Key_Greater || e->key() == Qt::Key_Period ) )
{
int firstSelectedIndex = firstSelectedVertex();
if ( firstSelectedIndex == -1) return;

mSelectedFeature->deselectAllVertexes();
safeSelectVertex( firstSelectedIndex + 1 );
mCanvas->refresh();
}
}

void QgsMapToolNodeTool::keyReleaseEvent( QKeyEvent* e )

0 comments on commit bb1639c

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