Navigation Menu

Skip to content

Commit

Permalink
[composer] Respect modifier keys when moving nodes with keys
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 1, 2016
1 parent 7a8a541 commit 4efbb8f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gui/qgscomposerview.cpp
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit 4efbb8f

Please sign in to comment.