NodeGraphQt
NodeGraphQt copied to clipboard
Event bug with port connection and navigation
I've encountered a reproducible bug that occurs with the following actions:
- Left-click and hold on any port, to draw the pipe
- Simultaneously, hold the middle-click and pan the graph
This will result in an error in NodeViewer.sceneMousePressEvent, as it cancels out the left click event:
# Traceback (most recent call last):
# File "...\NodeGraphQt\widgets\scene.py", line 76, in mousePressEvent
# self.viewer().sceneMousePressEvent(event)
# File "...\NodeGraphQt\widgets\viewer.py", line 334, in sceneMousePressEvent
# from_port = pipe.port_from_pos(pos, True)
# File "...\NodeGraphQt\qgraphics\pipe.py", line 193, in port_from_pos
# inport_pos = self.input_port.scenePos()
# AttributeError: 'NoneType' object has no attribute 'scenePos'
Here's a more destructive version of the bug:
- Left-click and hold on any port, to draw the pipe
- Move cursor over to any another port
- While simultaneously holding down left-click, hold the middle-click and pan the graph
- Move the nodes around; you'll see the pipe floating around in the scene on its own. Selecting it results in the same error we see above and it cannot be removed from that graph instance.
You've done some amazing work on this nodegraph framework so far. Thanks for making it available!