From cd7d94110875ad13e24fa42c67f436adbb90b7d0 Mon Sep 17 00:00:00 2001 From: joern274 Date: Fri, 17 Nov 2023 20:52:07 +0100 Subject: [PATCH] Fixed minor layout bug found during module tree branch test --- plugins/gui/src/graph_widget/layouters/graph_layouter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/gui/src/graph_widget/layouters/graph_layouter.cpp b/plugins/gui/src/graph_widget/layouters/graph_layouter.cpp index e1918230993..dae127f6260 100644 --- a/plugins/gui/src/graph_widget/layouters/graph_layouter.cpp +++ b/plugins/gui/src/graph_widget/layouters/graph_layouter.cpp @@ -945,8 +945,10 @@ namespace hal graphicsNet = san; int yGridPos = mGlobalInputHash.value(dnt->id(), -1); Q_ASSERT(yGridPos >= 0); - const EndpointCoordinate& epc = mEndpointHash.value(QPoint(mNodeBoundingBox.left(), yGridPos * 2)); - san->setInputPosition(QPointF(mCoordArrayX->lanePosition(mNodeBoundingBox.left(),0), epc.lanePosition(0, true))); + QPoint pnt(mNodeBoundingBox.left(), yGridPos * 2); + const EndpointCoordinate& epc = mEndpointHash.value(pnt); + const NetLayoutJunction* nlj = mJunctionHash.value(pnt); + san->setInputPosition(QPointF(mCoordArrayX->lanePosition(mNodeBoundingBox.left(),nlj?nlj->rect().left():0), epc.lanePosition(0, true))); } if (epl.hasOutputArrow()) {