Skip to content

Commit f9b15d3

Browse files
committedAug 19, 2014
[composer] Holding alt while pressing arrow keys results in moving items 1 pixel
1 parent 9d18220 commit f9b15d3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎src/gui/qgscomposerview.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,6 +1399,15 @@ void QgsComposerView::keyPressEvent( QKeyEvent * e )
13991399
//holding shift while pressing cursor keys results in a big step
14001400
increment = 10.0;
14011401
}
1402+
else if ( e->modifiers() & Qt::AltModifier )
1403+
{
1404+
//holding alt while pressing cursor keys results in a 1 pixel step
1405+
double viewScale = transform().m11();
1406+
if ( viewScale > 0 )
1407+
{
1408+
increment = 1 / viewScale;
1409+
}
1410+
}
14021411

14031412
if ( e->key() == Qt::Key_Left )
14041413
{

0 commit comments

Comments
 (0)
Please sign in to comment.