mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 16:20:52 +01:00
Restore commit 4476
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4478 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -235,6 +235,7 @@ void Diagram::keyPressEvent(QKeyEvent *e)
|
||||
bool transmit_event = true;
|
||||
if (!isReadOnly()) {
|
||||
QPointF movement;
|
||||
if (!this->selectedContent().elements.isEmpty()) {
|
||||
switch(e -> key()) {
|
||||
case Qt::Key_Left: movement = QPointF(-xGrid, 0.0); break;
|
||||
case Qt::Key_Right: movement = QPointF(+xGrid, 0.0); break;
|
||||
@@ -250,6 +251,7 @@ void Diagram::keyPressEvent(QKeyEvent *e)
|
||||
}
|
||||
if (transmit_event) {
|
||||
QGraphicsScene::keyPressEvent(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user