causality inference done

This commit is contained in:
2026-07-22 18:04:07 +02:00
parent 32154386e8
commit c918a6a428
13 changed files with 911 additions and 59 deletions

View File

@@ -27,7 +27,7 @@ class ConnectionStyle:
# This is the intentional code-level styling point for every port/connection type.
CONNECTION_STYLES: dict[str, ConnectionStyle] = {
"signal": ConnectionStyle(),
"power": ConnectionStyle(width=3.0, arrow_style="half", color="#000000"),
"power": ConnectionStyle(width=3.0, arrow_style="half", color="#000000", arrow_size=20.0),
}

View File

@@ -397,6 +397,19 @@ class ConnectionGraphicsItem(QGraphicsPathItem):
self.name_label: NameLabelItem | None = None
self.sync_name_label(connection)
def boundingRect(self) -> QRectF: # noqa: N802
"""Include custom arrowheads and causality marks in Qt's repaint area."""
decoration_margin = (
max(self.style.arrow_size, 6.0) + self.style.selected_width / 2 + 1.0
)
return super().boundingRect().adjusted(
-decoration_margin,
-decoration_margin,
decoration_margin,
decoration_margin,
)
def sync_name_label(self, connection: Connection) -> None:
visible = bool(connection.properties.get("showName", False))
if not visible: