Add line routing patches

This commit is contained in:
Joey Yakimowich-Payne 2026-02-06 12:39:11 -07:00
commit 65cd227f46
3 changed files with 161 additions and 25 deletions

View file

@ -0,0 +1,19 @@
diff --git a/src/ConnectionGraphicsObject.cpp b/src/ConnectionGraphicsObject.cpp
index 05ae46b..9a1eeea 100644
--- a/src/ConnectionGraphicsObject.cpp
+++ b/src/ConnectionGraphicsObject.cpp
@@ -107,6 +107,14 @@ QRectF ConnectionGraphicsObject::boundingRect() const
QRectF commonRect = basicRect.united(c1c2Rect);
+ // Include the painter stroke so custom painters that route beyond
+ // the default bezier control points are not clipped.
+ auto *ns = nodeScene();
+ if (ns) {
+ QRectF strokeRect = ns->connectionPainter().getPainterStroke(*this).boundingRect();
+ commonRect = commonRect.united(strokeRect);
+ }
+
auto const &connectionStyle = StyleCollection::connectionStyle();
float const diam = connectionStyle.pointDiameter();
QPointF const cornerOffset(diam, diam);