| 677 | # ── geometry ────────────────────────────────────────────────────────────── |
| 678 | |
| 679 | def boundingRect(self): |
| 680 | br = super().boundingRect() |
| 681 | for lbl in self._labels.values(): |
| 682 | br = br.united(lbl.mapRectToParent(lbl.boundingRect())) |
| 683 | # Always include the pin-marker squares so they're never clipped; kept |
| 684 | # independent of connection state so toggling a marker is just an update(). |
| 685 | size = config.HANDLE_SIZE |
| 686 | h = size / 2.0 |
| 687 | for lx, ly in PIN_POSITIONS.get(self.symbol_name, []): |
| 688 | br = br.united(QRectF(lx - h, ly - h, size, size)) |
| 689 | return br |
| 690 | |
| 691 | def shape(self) -> QPainterPath: |
| 692 | tight = SYMBOL_TIGHT_RECT.get(self.symbol_name) |