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

Method _refresh_preview

SLiCAP/schematic/canvas.py:941–951  ·  view source on GitHub ↗
(self, cursor: QPointF | None)

Source from the content-addressed store, hash-verified

939 self._sync_junctions()
940
941 def _refresh_preview(self, cursor: QPointF | None):
942 self._last_cursor = cursor
943 if not self._wire_points or cursor is None:
944 return
945 pts = self._wire_points + _elbow(self._wire_points[-1], cursor, self._wire_h_first)[1:]
946 path = _build_path(pts)
947 if self._wire_preview is None:
948 self._wire_preview = QGraphicsPathItem()
949 self._wire_preview.setPen(_make_preview_pen())
950 self.addItem(self._wire_preview)
951 self._wire_preview.setPath(path)
952
953 # ── data model ────────────────────────────────────────────────────────────
954

Callers 3

toggle_elbowMethod · 0.95
mousePressEventMethod · 0.95
mouseMoveEventMethod · 0.95

Calls 3

_elbowFunction · 0.85
_build_pathFunction · 0.85
_make_preview_penFunction · 0.85

Tested by

no test coverage detected