Bugfix: arrow keys triggered both items movement and scroll area on diagrams.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1657 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2012-04-16 06:33:26 +00:00
parent b89397670e
commit 417ef1b02e

View File

@@ -161,9 +161,12 @@ void Diagram::keyPressEvent(QKeyEvent *e) {
if (!movement.isNull() && !focusItem()) {
beginMoveElements();
continueMoveElements(movement);
e -> accept();
}
}
if (!e -> isAccepted()) {
QGraphicsScene::keyPressEvent(e);
}
}
/**
@@ -179,9 +182,12 @@ void Diagram::keyReleaseEvent(QKeyEvent *e) {
!e -> isAutoRepeat()
) {
endMoveElements();
e->accept();
}
}
if (!e -> isAccepted()) {
QGraphicsScene::keyReleaseEvent(e);
}
}
/**