forward keyboard events to scene after selecting item with Tab

This commit is contained in:
Martin Baeuml
2011-05-17 15:42:21 +02:00
parent 586c1f1766
commit 0c76ddeb99
+6
View File
@@ -172,8 +172,14 @@ class AnnotationScene(QGraphicsScene):
# key event handlers
#______________________________________________________________________________________________________
def selectNextItem(self):
# disable inserting
# TODO: forward this to the ButtonArea
self.inserter_ = None
# set focus to the view, so that subsequent keyboard events are forwarded to the scene
if len(self.views()) > 0:
self.views()[0].setFocus(True)
if len(self.selectedItems()) == 0:
for item in self.items():
if (item.flags() & QGraphicsItem.ItemIsSelectable):