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);