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

Method update_label

SLiCAP/schematic/wire_item.py:137–146  ·  view source on GitHub ↗

Create, update, or hide the net-name label child item.

(self)

Source from the content-addressed store, hash-verified

135 # ── net label ─────────────────────────────────────────────────────────────
136
137 def update_label(self) -> None:
138 """Create, update, or hide the net-name label child item."""
139 if self.display_name and self.net_name:
140 if self._net_label is None:
141 self._net_label = _NetLabel(self)
142 self._net_label.setText(self.net_name)
143 self._net_label.setVisible(True)
144 self._place_label()
145 elif self._net_label is not None:
146 self._net_label.setVisible(False)
147
148 def _place_label(self) -> None:
149 """Position the label at points[0] + label_offset."""

Callers 8

_commit_pasteMethod · 0.95
_do_wire_splitMethod · 0.95
_split_wire_elbowsMethod · 0.95
from_dataMethod · 0.95
_sync_port_net_namesMethod · 0.80
_open_net_labelMethod · 0.80
keyPressEventMethod · 0.80

Calls 2

_place_labelMethod · 0.95
_NetLabelClass · 0.85

Tested by

no test coverage detected