Skip to content

Commit

Permalink
Bugfix: routing of global inputs and outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
joern274 committed Nov 13, 2023
1 parent 1736731 commit 0d1ff5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace hal {
*
* @param v - The visuals to set.
*/
virtual void setVisuals(const Visuals& v);
virtual void setVisuals(const Visuals& v) override;

/**
* Overwritten qt function to draw the net.
Expand Down
8 changes: 4 additions & 4 deletions plugins/gui/src/graph_widget/layouters/graph_layouter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -936,25 +936,25 @@ namespace hal
case EndpointList::HasGlobalEndpoint:
if (epl.hasInputArrow())
{
StandardArrowNet* san = new StandardArrowNet(n, dnt->mLines);
StandardArrowNet* san = new StandardArrowNet(n, dnt->mLines, dnt->mKnots);
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(),-1), epc.lanePosition(0, true)));
san->setInputPosition(QPointF(mCoordArrayX->lanePosition(mNodeBoundingBox.left(),0), epc.lanePosition(0, true)));
}
if (epl.hasOutputArrow())
{
if (graphicsNet) mScene->addGraphItem(graphicsNet);
StandardArrowNet* san = new StandardArrowNet(n, dnt->mLines);
StandardArrowNet* san = new StandardArrowNet(n, dnt->mLines, dnt->mKnots);
graphicsNet = san;
int yGridPos = mGlobalOutputHash.value(dnt->id(), -1);
Q_ASSERT(yGridPos >= 0);
QPoint pnt(mNodeBoundingBox.right() + 1, yGridPos * 2);
const EndpointCoordinate& epc = mEndpointHash.value(pnt);
const NetLayoutJunction* nlj = mJunctionHash.value(pnt);
Q_ASSERT(nlj);
san->setOutputPosition(QPointF(mCoordArrayX->lanePosition(pnt.x(),nlj->rect().right() + 1), epc.lanePosition(0, true)));
san->setOutputPosition(QPointF(mCoordArrayX->lanePosition(pnt.x(),nlj->rect().right()), epc.lanePosition(0, true)));
}
break;
case EndpointList::SourceAndDestination:
Expand Down

0 comments on commit 0d1ff5f

Please sign in to comment.