mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
debug right click graph
This commit is contained in:
1 parent
a0f964e89e
commit
b83494888b
1 file changed
+8
@@ -999,12 +999,20 @@ class GraphWidget(QGraphicsView):
|
||||
items = self.items(event.pos())
|
||||
|
||||
# Select current menu
|
||||
while len(items) > 0:
|
||||
if type(items[0]) in [NodeItem, EdgeItem]:
|
||||
break
|
||||
else:
|
||||
items = items[1:]
|
||||
|
||||
if len(items) == 0:
|
||||
m_type = DefaultMenu
|
||||
elif type(items[0]) is NodeItem:
|
||||
m_type = NodeMenu
|
||||
elif type(items[0]) is EdgeItem:
|
||||
m_type = EdgeMenu
|
||||
else:
|
||||
m_type = DefaultMenu
|
||||
|
||||
# Create and exec menu
|
||||
m = m_type(
|
||||
|
||||
Reference in new issue
Block a user