Skip to content

Commit

Permalink
Updated GNEJunction. Refs #13894
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Dec 19, 2023
1 parent 9f460ef commit 1617fb1
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions src/netedit/elements/network/GNEJunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,18 +638,11 @@ GNEJunction::drawGL(const GUIVisualizationSettings& s) const {
// draw TLS
drawTLSIcon(s, d);
// draw elevation
if (!s.drawForRectangleSelection && myNet->getViewNet()->getNetworkViewOptions().editingElevation()) {
GLHelper::pushMatrix();
// Translate to center of junction
glTranslated(myNBNode->getPosition().x(), myNBNode->getPosition().y(), 0.1);
// draw Z value
GLHelper::drawText(toString(myNBNode->getPosition().z()), Position(), GLO_MAX - 5, s.junctionID.scaledSize(s.scale), s.junctionID.color);
GLHelper::popMatrix();
}
drawElevation(s, d);
// pop layer Matrix
GLHelper::popMatrix();
// draw lock icon
GNEViewNetHelper::LockIcon::drawLockIcon(this, getType(), getPositionInView(), 1);
GNEViewNetHelper::LockIcon::drawLockIcon(s, d, this, getType(), getPositionInView(), 1);
// draw junction name
drawJunctionName(s, d);
}
Expand Down Expand Up @@ -1693,6 +1686,20 @@ GNEJunction::drawTLSIcon(const GUIVisualizationSettings& s, const GUIVisualizati
}


void
GNEJunction::drawElevation(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d) const {
// check if draw elevation
if ((d <= GUIVisualizationSettings::Detail::Text) && myNet->getViewNet()->getNetworkViewOptions().editingElevation()) {
GLHelper::pushMatrix();
// Translate to center of junction
glTranslated(myNBNode->getPosition().x(), myNBNode->getPosition().y(), 0.1);
// draw Z value
GLHelper::drawText(toString(myNBNode->getPosition().z()), Position(), GLO_MAX - 5, s.junctionID.scaledSize(s.scale), s.junctionID.color);
GLHelper::popMatrix();
}
}


void
GNEJunction::drawJunctionName(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d) const {
// draw name and ID
Expand Down

0 comments on commit 1617fb1

Please sign in to comment.