Add line routing patches
This commit is contained in:
parent
5bb41373b2
commit
65cd227f46
3 changed files with 161 additions and 25 deletions
19
patches/qtnodes-connection-boundingRect.patch
Normal file
19
patches/qtnodes-connection-boundingRect.patch
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue