mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-22 09:40:52 +01:00
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:
@@ -161,10 +161,13 @@ void Diagram::keyPressEvent(QKeyEvent *e) {
|
||||
if (!movement.isNull() && !focusItem()) {
|
||||
beginMoveElements();
|
||||
continueMoveElements(movement);
|
||||
e -> accept();
|
||||
}
|
||||
}
|
||||
if (!e -> isAccepted()) {
|
||||
QGraphicsScene::keyPressEvent(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Gere les relachements de touches du clavier
|
||||
@@ -179,10 +182,13 @@ void Diagram::keyReleaseEvent(QKeyEvent *e) {
|
||||
!e -> isAutoRepeat()
|
||||
) {
|
||||
endMoveElements();
|
||||
e->accept();
|
||||
}
|
||||
}
|
||||
if (!e -> isAccepted()) {
|
||||
QGraphicsScene::keyReleaseEvent(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Exporte le schema vers une image
|
||||
|
||||
Reference in New Issue
Block a user