diff --git a/sources/editor/elementscene.cpp b/sources/editor/elementscene.cpp index ab8a0d5b7..b77e0dfe3 100644 --- a/sources/editor/elementscene.cpp +++ b/sources/editor/elementscene.cpp @@ -110,6 +110,7 @@ void ElementScene::mouseMoveEvent(QGraphicsSceneMouseEvent *e) { } QGraphicsScene::mouseMoveEvent(e); + } /** @@ -209,8 +210,23 @@ void ElementScene::keyPressEvent(QKeyEvent *event) QGraphicsObject *qgo = selectedItems().first()->toGraphicsObject(); if(qgo) { - QPointF original_pos = qgo->pos(); - QPointF p = qgo->pos(); + QPointF original_pos = qgo->pos(); + QPointF p = qgo->pos(); + + if (event->modifiers() & Qt::ControlModifier) { + + int k = event->key(); + if(k == Qt::Key_Right) + p.rx() += 0.1; + else if (k == Qt::Key_Left) + p.rx() -= 0.1; + else if (k == Qt::Key_Up) + p.ry() -= 0.1; + else if (k == Qt::Key_Down) + p.ry() += 0.1; + } + else { + int k = event->key(); if(k == Qt::Key_Right) p.rx() += 1; @@ -220,6 +236,7 @@ void ElementScene::keyPressEvent(QKeyEvent *event) p.ry() -= 1; else if (k == Qt::Key_Down) p.ry() += 1; + } qgo->setPos(p); QPropertyUndoCommand *undo = new QPropertyUndoCommand(qgo, "pos", QVariant(original_pos), QVariant(p));