Create, update, or hide the net-name label child item.
(self)
| 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.""" |
no test coverage detected