Skip to content

Commit

Permalink
Restored original GNELane. Fixed #14327
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Feb 23, 2024
1 parent b007a85 commit 9fb65e3
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/netedit/elements/network/GNELane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1752,35 +1752,35 @@ void
GNELane::drawLaneAsRailway() const {
// draw foot width 150mm, assume that distance between rail feet inner sides is reduced on both sides by 39mm with regard to the gauge
// assume crosstie length of 181% gauge (2600mm for standard gauge)
// draw as box lines
if (myShapeColors.size() > 0) {
// draw colored box lines
GUIGeometry::drawGeometry(myDrawingConstants->getDetail(), myLaneGeometry, myShapeColors,
myDrawingConstants->getDrawingWidth(), myDrawingConstants->getOffset());
} else {
// draw geometry with current color
GUIGeometry::drawGeometry(myDrawingConstants->getDetail(), myLaneGeometry, myDrawingConstants->getDrawingWidth(),
myDrawingConstants->getOffset());
}
// continue depending of detail
if (myDrawingConstants->getDetail() <= GUIVisualizationSettings::Detail::LaneDetails) {
// calculate intern geometry width
const double internGeometryWidth = myDrawingConstants->getInternalDrawingWidth() - (2 * SUMO_const_laneMarkWidth);
// Save current color
RGBColor current = GLHelper::getColor();
// Draw gray on top with reduced width (the area between the two tracks)
glColor3d(0.8, 0.8, 0.8);
// Set current color back
GLHelper::setColor(GLHelper::getColor());
// move
glTranslated(0, 0, 0.1);
// calculate width
const double crossbarWidth = 0.2 * myDrawingConstants->getExaggeration();
// draw geometry
GUIGeometry::drawGeometry(myDrawingConstants->getDetail(), myLaneGeometry, internGeometryWidth,
myDrawingConstants->getOffset());
// Set current color back
GLHelper::setColor(current);
GUIGeometry::drawGeometry(myDrawingConstants->getDetail(), myLaneGeometry, crossbarWidth,
myDrawingConstants->getOffset() - 1);

// draw geometry
GUIGeometry::drawGeometry(myDrawingConstants->getDetail(), myLaneGeometry, crossbarWidth,
myDrawingConstants->getOffset() + 1);
// Draw crossties
GLHelper::drawCrossTies(myLaneGeometry.getShape(), myLaneGeometry.getShapeRotations(), myLaneGeometry.getShapeLengths(),
0.26 * myDrawingConstants->getExaggeration(), 0.6 * myDrawingConstants->getExaggeration(),
crossbarWidth, 0.6 * myDrawingConstants->getExaggeration(),
myDrawingConstants->getDrawingWidth(), myDrawingConstants->getOffset(), false);
} else if (myShapeColors.size() > 0) {
// draw colored box lines
GUIGeometry::drawGeometry(myDrawingConstants->getDetail(), myLaneGeometry, myShapeColors,
myDrawingConstants->getDrawingWidth(), myDrawingConstants->getOffset());
} else {
// draw geometry with current color
GUIGeometry::drawGeometry(myDrawingConstants->getDetail(), myLaneGeometry, myDrawingConstants->getDrawingWidth(),
myDrawingConstants->getOffset());
}
}

Expand Down

0 comments on commit 9fb65e3

Please sign in to comment.