Skip to content

Commit

Permalink
bugfix: keep y-position map and vector in sync
Browse files Browse the repository at this point in the history
  • Loading branch information
joern274 committed Aug 1, 2024
1 parent 50b6764 commit 07152f1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions plugins/gui/src/graph_widget/layouters/graph_layouter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,6 @@ namespace hal
int iy0 = mNodeBoundingBox.y() * 2;
float y0 = mCoordY[iy0].preLanes() * sLaneSpacing + sVRoadPadding;
mCoordY[iy0].setOffset(y0);
mYValues.append(mCoordY.value(iy0).lanePosition(0));
auto ityLast = mCoordY.begin();
for (auto itNext = ityLast + 1; itNext != mCoordY.end(); ++itNext)
{
Expand All @@ -789,7 +788,6 @@ namespace hal
{
// netjunction -> endpoint
itNext->setOffsetYje(ityLast.value(), mJunctionMinDistanceY.value(iy1));
mYValues.append(itNext.value().lanePosition(0));
}
else
{
Expand All @@ -802,6 +800,16 @@ namespace hal
}
ityLast = itNext;
}

iy0 = mNodeBoundingBox.y() * 2;
auto ity = mCoordY.find(iy0);
while(ity != mCoordY.end())
{
std::cerr << iy0 << " mYValues[" << mYValues.size() << "] = " << ity.value().lanePosition(0) << std::endl;
mYValues.append(ity.value().lanePosition(0));
iy0 += 2;
ity = mCoordY.find(iy0);
}
}

void GraphLayouter::placeGates()
Expand Down

0 comments on commit 07152f1

Please sign in to comment.