Skip to content
Permalink
Browse files

[composer] Respect modifier keys when moving nodes with keys

  • Loading branch information
nyalldawson committed Apr 1, 2016
1 parent 7a8a541 commit 4efbb8fcf5c6425d1748f0735cb19b30f7500981
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/gui/qgscomposerview.cpp
@@ -1810,7 +1810,7 @@ void QgsComposerView::keyPressEvent( QKeyEvent * e )

if ( mNodesItem->nodePosition( mNodesItemIndex, currentPos ) )
{
currentPos.setX( currentPos.x() - 1 );
currentPos.setX( currentPos.x() - increment );

composition()->beginCommand( mNodesItem, tr( "Move item node" ) );
mNodesItem->moveNode( mNodesItemIndex, currentPos );
@@ -1840,7 +1840,7 @@ void QgsComposerView::keyPressEvent( QKeyEvent * e )

if ( mNodesItem->nodePosition( mNodesItemIndex, currentPos ) )
{
currentPos.setX( currentPos.x() + 1 );
currentPos.setX( currentPos.x() + increment );

composition()->beginCommand( mNodesItem, tr( "Move item node" ) );
mNodesItem->moveNode( mNodesItemIndex, currentPos );
@@ -1870,7 +1870,7 @@ void QgsComposerView::keyPressEvent( QKeyEvent * e )

if ( mNodesItem->nodePosition( mNodesItemIndex, currentPos ) )
{
currentPos.setY( currentPos.y() + 1 );
currentPos.setY( currentPos.y() + increment );

composition()->beginCommand( mNodesItem, tr( "Move item node" ) );
mNodesItem->moveNode( mNodesItemIndex, currentPos );
@@ -1900,7 +1900,7 @@ void QgsComposerView::keyPressEvent( QKeyEvent * e )

if ( mNodesItem->nodePosition( mNodesItemIndex, currentPos ) )
{
currentPos.setY( currentPos.y() - 1 );
currentPos.setY( currentPos.y() - increment );

composition()->beginCommand( mNodesItem, tr( "Move item node" ) );
mNodesItem->moveNode( mNodesItemIndex, currentPos );

0 comments on commit 4efbb8f

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