MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / itemChange

Method itemChange

SLiCAP/schematic/junction_item.py:38–46  ·  view source on GitHub ↗
(self, change, value)

Source from the content-addressed store, hash-verified

36 return QRectF(-r, -r, 2.0 * r, 2.0 * r)
37
38 def itemChange(self, change, value):
39 if change == QGraphicsItem.ItemPositionChange:
40 snapped = snap(value)
41 if self.scene() and not getattr(self.scene(), '_group_drag_active', False):
42 delta = snapped - self.pos()
43 if delta.x() or delta.y():
44 self._rubber_band_wires(delta)
45 return snapped
46 return super().itemChange(change, value)
47
48 def _rubber_band_wires(self, delta: QPointF) -> None:
49 """Move wire endpoints that currently touch this junction."""

Callers

nothing calls this directly

Calls 2

_rubber_band_wiresMethod · 0.95
snapFunction · 0.85

Tested by

no test coverage detected