MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / _do_wire_split

Method _do_wire_split

SLiCAP/schematic/canvas.py:1070–1084  ·  view source on GitHub ↗
(self, wire, pts1: list, pts2: list)

Source from the content-addressed store, hash-verified

1068 return
1069
1070 def _do_wire_split(self, wire, pts1: list, pts2: list) -> None:
1071 net_name = wire.net_name
1072 display_name = wire.display_name
1073 net_locked = wire.net_locked
1074 user_net_name = wire._user_net_name
1075 self.removeItem(wire)
1076 for i, pts in enumerate([pts1, pts2]):
1077 if len(pts) >= 2:
1078 w = WireItem(pts)
1079 w.net_name = net_name
1080 w.display_name = display_name if i == 0 else False
1081 w.net_locked = net_locked
1082 w._user_net_name = user_net_name
1083 self.addItem(w)
1084 w.update_label()
1085
1086 # ── post-drag reconnection ────────────────────────────────────────────────
1087

Callers 1

_split_wire_atMethod · 0.95

Calls 2

update_labelMethod · 0.95
WireItemClass · 0.85

Tested by

no test coverage detected