Skip to content

Commit

Permalink
Fixed problem drawing edge start and end position. Refs #14372
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Feb 23, 2024
1 parent 9fb65e3 commit b49de8b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/netedit/elements/network/GNEEdge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2530,12 +2530,10 @@ GNEEdge::drawEdgeGeometryPoints(const GUIVisualizationSettings& s, const GUIVisu
const auto geometryPointPos = myNBEdge->getGeometry()[i];
// push geometry point drawing matrix
GLHelper::pushMatrix();
// translate to front depending of big points
glTranslated(0, 0, bigGeometryPoints ? GLO_GEOMETRYPOINT : GLO_LANE + 1);
// set color
GLHelper::setColor(geometryPointColor);
// move to geometryPointPos
glTranslated(geometryPointPos.x(), geometryPointPos.y(), 0.1);
// move geometry point geometryPointPos
glTranslated(geometryPointPos.x(), geometryPointPos.y(), bigGeometryPoints ? GLO_GEOMETRYPOINT : GLO_LANE + 1);
// draw filled circle (resolution of drawn circle depending of the zoom, to improve smoothness)
GLHelper::drawFilledCircleDetailled(d, geometryPointRadius);
// draw elevation or special symbols (Start, End and Block)
Expand Down Expand Up @@ -2585,7 +2583,7 @@ GNEEdge::drawStartGeometryPoint(const GUIVisualizationSettings& s, const GUIVisu
// push drawing matrix
GLHelper::pushMatrix();
// move to point position
glTranslated(startGeometryPointPos.x(), startGeometryPointPos.y(), 0.1);
glTranslated(startGeometryPointPos.x(), startGeometryPointPos.y(), GLO_GEOMETRYPOINT);
// resolution of drawn circle depending of detail
GLHelper::drawFilledCircleDetailled(d, geometryPointRadius, angle + 90, angle + 270);
// pop drawing matrix
Expand All @@ -2595,7 +2593,7 @@ GNEEdge::drawStartGeometryPoint(const GUIVisualizationSettings& s, const GUIVisu
// push drawing matrix
GLHelper::pushMatrix();
// move top
glTranslated(0, 0, 0.2);
glTranslated(0, 0, GLO_GEOMETRYPOINT + 0.1);
// draw S
GLHelper::drawText("S", startGeometryPointPos, 0, geometryPointRadius, RGBColor(0, 50, 255));
// pop drawing matrix
Expand Down Expand Up @@ -2649,7 +2647,7 @@ GNEEdge::drawEndGeometryPoint(const GUIVisualizationSettings& s, const GUIVisual
// push drawing matrix
GLHelper::pushMatrix();
// move to point position
glTranslated(geometryPointPos.x(), geometryPointPos.y(), 0.1);
glTranslated(geometryPointPos.x(), geometryPointPos.y(), GLO_GEOMETRYPOINT);
// resolution of drawn circle depending of detail
GLHelper::drawFilledCircleDetailled(d, geometryPointRadius, angle + 90, angle + 270);
// pop drawing matrix
Expand All @@ -2659,7 +2657,7 @@ GNEEdge::drawEndGeometryPoint(const GUIVisualizationSettings& s, const GUIVisual
// push drawing matrix
GLHelper::pushMatrix();
// move top
glTranslated(0, 0, 0.2);
glTranslated(0, 0, GLO_GEOMETRYPOINT + 0.1);
// draw S
GLHelper::drawText("E", geometryPointPos, 0, geometryPointRadius, RGBColor(0, 50, 255));
// pop drawing matrix
Expand Down

0 comments on commit b49de8b

Please sign in to comment.