From 01ea5edcadc4edbcf7cce460813a6db9e89ef3de Mon Sep 17 00:00:00 2001 From: Martin Baeuml Date: Tue, 6 Dec 2011 16:51:38 +0100 Subject: [PATCH] GroupItem may not be selected or focused Only its children can be. This fixes the problem, that a group item could even be selected by clicking somewhere between the item's children and the upper left corner of the scene (because the group items bounding rect extends all the way up to (0,0)) --- sloth/items/items.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sloth/items/items.py b/sloth/items/items.py index 227febb..709a987 100644 --- a/sloth/items/items.py +++ b/sloth/items/items.py @@ -416,6 +416,8 @@ class GroupItem(BaseItem): self._children = [] BaseItem.__init__(self, model_item, prefix, parent) self.setFlag(QGraphicsItem.ItemIsMovable, False) + self.setFlag(QGraphicsItem.ItemIsSelectable, False) + self.setFlag(QGraphicsItem.ItemIsFocusable, False) self.createChildren()