MCPcopy Create free account
hub / github.com/bhowiebkr/PyFlowGraph / end_drag_connection

Method end_drag_connection

src/core/node_graph.py:692–703  ·  view source on GitHub ↗
(self, end_pos)

Source from the content-addressed store, hash-verified

690 self.update()
691
692 def end_drag_connection(self, end_pos):
693 if self._drag_connection is None or self._drag_start_pin is None:
694 return
695 target_item = self.itemAt(end_pos, self.views()[0].transform())
696 self.removeItem(self._drag_connection)
697 self._drag_connection = None
698 if isinstance(target_item, Pin):
699 end_pin = target_item
700 if end_pin.direction == "input" and end_pin.connections:
701 self.remove_connection(end_pin.connections[0])
702 self.create_connection(self._drag_start_pin, end_pin)
703 self._drag_start_pin = None
704
705 def mouseMoveEvent(self, event):
706 if self._drag_connection:

Callers 1

mouseReleaseEventMethod · 0.95

Calls 2

remove_connectionMethod · 0.95
create_connectionMethod · 0.95

Tested by

no test coverage detected