fixed context menu handling for non-GraphicsItems
This commit is contained in:
parent
23a0d6d7c0
commit
19cf49bc7d
@ -525,6 +525,8 @@ class GraphicsScene(QtGui.QGraphicsScene):
|
||||
item = item.parentItem()
|
||||
if item is None:
|
||||
item = self
|
||||
if not hasattr(item, "getContextMenus"):
|
||||
continue
|
||||
subMenus = item.getContextMenus(event) or []
|
||||
if isinstance(subMenus, list): ## so that some items (like FlowchartViewBox) can return multiple menus
|
||||
menusToAdd.extend(subMenus)
|
||||
|
Loading…
Reference in New Issue
Block a user