Skip to content

Commit

Permalink
Remove all pushNames/popNames. Refs #13894
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Dec 19, 2023
1 parent 77b49ec commit b084f04
Show file tree
Hide file tree
Showing 37 changed files with 0 additions and 236 deletions.
4 changes: 0 additions & 4 deletions src/netedit/elements/additional/GNEAccess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,6 @@ GNEAccess::drawGL(const GUIVisualizationSettings& s) const {
}
// draw parent and child lines
drawParentChildLines(s, accessColor);
// Start drawing adding an gl identificator
GLHelper::pushName(getGlID());
// push layer matrix
GLHelper::pushMatrix();
// translate to front
Expand All @@ -241,8 +239,6 @@ GNEAccess::drawGL(const GUIVisualizationSettings& s) const {
}
// pop layer matrix
GLHelper::popMatrix();
// pop gl identificator
GLHelper::popName();
// draw lock icon
GNEViewNetHelper::LockIcon::drawLockIcon(this, getType(), myAdditionalGeometry.getShape().front(), accessExaggeration, 0.3);
}
Expand Down
10 changes: 0 additions & 10 deletions src/netedit/elements/additional/GNEAdditional.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,6 @@ GNEAdditional::drawSquaredAdditional(const GUIVisualizationSettings& s, const Po
const auto d = s.getDetailLevel(exaggeration);
// draw geometry only if we'rent in drawForObjectUnderCursor mode
if (!s.drawForObjectUnderCursor) {
// Start drawing adding an gl identificator
GLHelper::pushName(getGlID());
// Add layer matrix
GLHelper::pushMatrix();
// translate to front
Expand All @@ -713,8 +711,6 @@ GNEAdditional::drawSquaredAdditional(const GUIVisualizationSettings& s, const Po
}
// Pop layer matrix
GLHelper::popMatrix();
// Pop name
GLHelper::popName();
// draw lock icon
GNEViewNetHelper::LockIcon::drawLockIcon(this, getType(), pos, exaggeration, 0.4, 0.5, 0.5);
// Draw additional ID
Expand Down Expand Up @@ -760,8 +756,6 @@ GNEAdditional::drawListedAdditional(const GUIVisualizationSettings& s, const Pos
if (!s.drawForObjectUnderCursor) {
// set position depending of indexes
signPosition.add(4.5 + (baseOffsetX * offsetX), (drawPositionIndex * -1) - extraOffsetY + 1, 0);
// Start drawing adding an gl identifier
GLHelper::pushName(getGlID());
// calculate colors
const RGBColor baseColor = isAttributeCarrierSelected() ? s.colorSettings.selectedAdditionalColor : baseCol;
const RGBColor secondColor = baseColor.changedBrightness(-30);
Expand Down Expand Up @@ -808,8 +802,6 @@ GNEAdditional::drawListedAdditional(const GUIVisualizationSettings& s, const Pos
if (GNEViewNetHelper::LockIcon::checkDrawing(this, getType(), 1)) {
// pop layer matrix
GLHelper::popMatrix();
// Pop name
GLHelper::popName();
// draw lock icon
GNEViewNetHelper::LockIcon::drawLockIcon(this, getType(), signPosition, 1, 0.4, 0.0, -0.05);
} else {
Expand All @@ -823,8 +815,6 @@ GNEAdditional::drawListedAdditional(const GUIVisualizationSettings& s, const Pos
GUITexturesHelper::drawTexturedBox(GUITextureSubSys::getTexture(texture), 0.25);
// pop layer matrix
GLHelper::popMatrix();
// Pop name
GLHelper::popName();
}
}
// draw squared shape
Expand Down
4 changes: 0 additions & 4 deletions src/netedit/elements/additional/GNEBusStop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ GNEBusStop::drawGL(const GUIVisualizationSettings& s) const {
}
// draw parent and child lines
drawParentChildLines(s, baseColor);
// Start drawing adding an gl identificator
GLHelper::pushName(getGlID());
// Add layer matrix
GLHelper::pushMatrix();
// translate to front
Expand All @@ -174,8 +172,6 @@ GNEBusStop::drawGL(const GUIVisualizationSettings& s) const {
}
// pop layer matrix
GLHelper::popMatrix();
// Pop name
GLHelper::popName();
// draw lock icon
GNEViewNetHelper::LockIcon::drawLockIcon(this, getType(), myAdditionalGeometry.getShape().getCentroid(), busStopExaggeration, (myTagProperty.getTag() == SUMO_TAG_BUS_STOP) ? 0.5 : 0.25);
// Draw additional ID
Expand Down
4 changes: 0 additions & 4 deletions src/netedit/elements/additional/GNECalibrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,6 @@ GNECalibrator::drawCalibratorSymbol(const GUIVisualizationSettings& s, const GUI
const Position& pos, const double rot) const {
// draw geometry only if we'rent in drawForObjectUnderCursor mode
if (!s.drawForObjectUnderCursor) {
// begin push name
GLHelper::pushName(getGlID());
// push layer matrix
GLHelper::pushMatrix();
// translate to front
Expand Down Expand Up @@ -479,8 +477,6 @@ GNECalibrator::drawCalibratorSymbol(const GUIVisualizationSettings& s, const GUI
}
// pop layer matrix
GLHelper::popMatrix();
// pop name
GLHelper::popName();
}
// draw dotted contour
myContour.drawDottedContourRectangle(s, d, pos, s.additionalSettings.calibratorWidth, s.additionalSettings.calibratorHeight * 0.5, 0,
Expand Down
4 changes: 0 additions & 4 deletions src/netedit/elements/additional/GNEChargingStation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ GNEChargingStation::drawGL(const GUIVisualizationSettings& s) const {
}
// draw parent and child lines
drawParentChildLines(s, s.additionalSettings.connectionColor);
// Start drawing adding an gl identificator
GLHelper::pushName(getGlID());
// Add a layer matrix
GLHelper::pushMatrix();
// translate to front
Expand All @@ -170,8 +168,6 @@ GNEChargingStation::drawGL(const GUIVisualizationSettings& s) const {
}
// pop layer matrix
GLHelper::popMatrix();
// Pop name
GLHelper::popName();
// draw lock icon
GNEViewNetHelper::LockIcon::drawLockIcon(this, getType(), myAdditionalGeometry.getShape().getCentroid(), chargingStationExaggeration);
// Draw additional ID
Expand Down
4 changes: 0 additions & 4 deletions src/netedit/elements/additional/GNEContainerStop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ GNEContainerStop::drawGL(const GUIVisualizationSettings& s) const {
}
// draw parent and child lines
drawParentChildLines(s, s.additionalSettings.connectionColor);
// Start drawing adding an gl identificator
GLHelper::pushName(getGlID());
// Add a layer matrix
GLHelper::pushMatrix();
// translate to front
Expand All @@ -167,8 +165,6 @@ GNEContainerStop::drawGL(const GUIVisualizationSettings& s) const {
}
// pop layer matrix
GLHelper::popMatrix();
// Pop name
GLHelper::popName();
// draw lock icon
GNEViewNetHelper::LockIcon::drawLockIcon(this, getType(), myAdditionalGeometry.getShape().getCentroid(), containerStopExaggeration);
// Draw additional ID
Expand Down
4 changes: 0 additions & 4 deletions src/netedit/elements/additional/GNEEntryExitDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ GNEEntryExitDetector::drawGL(const GUIVisualizationSettings& s) const {
if (!s.drawForObjectUnderCursor) {
// draw parent and child lines
drawParentChildLines(s, s.additionalSettings.connectionColor);
// Start drawing adding gl identificator
GLHelper::pushName(getGlID());
// Push layer matrix
GLHelper::pushMatrix();
// translate to front
Expand All @@ -155,8 +153,6 @@ GNEEntryExitDetector::drawGL(const GUIVisualizationSettings& s) const {
drawE3Logo(s, d, color, entryExitExaggeration);
// pop layer matrix
GLHelper::popMatrix();
// pop gl identificator
GLHelper::popName();
// draw additional name
drawAdditionalName(s);
// draw lock icon
Expand Down
4 changes: 0 additions & 4 deletions src/netedit/elements/additional/GNEInductionLoopDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@ GNEInductionLoopDetector::drawGL(const GUIVisualizationSettings& s) const {
}
// draw parent and child lines
drawParentChildLines(s, s.additionalSettings.connectionColor);
// start drawing
GLHelper::pushName(getGlID());
// push layer matrix
GLHelper::pushMatrix();
// translate to front
Expand All @@ -193,8 +191,6 @@ GNEInductionLoopDetector::drawGL(const GUIVisualizationSettings& s) const {
drawE1DetectorLogo(s, d, E1Exaggeration, "E1", textColor);
// pop layer matrix
GLHelper::popMatrix();
// Pop name
GLHelper::popName();
// draw lock icon
GNEViewNetHelper::LockIcon::drawLockIcon(this, getType(), myAdditionalGeometry.getShape().getCentroid(), E1Exaggeration);
// Draw additional ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ GNEInstantInductionLoopDetector::drawGL(const GUIVisualizationSettings& s) const
}
// draw parent and child lines
drawParentChildLines(s, s.additionalSettings.connectionColor);
// start drawing
GLHelper::pushName(getGlID());
// push layer matrix
GLHelper::pushMatrix();
// translate to front
Expand All @@ -175,8 +173,6 @@ GNEInstantInductionLoopDetector::drawGL(const GUIVisualizationSettings& s) const
drawE1DetectorLogo(s, d, E1InstantExaggeration, "E1", textColor);
// pop layer matrix
GLHelper::popMatrix();
// Pop name
GLHelper::popName();
// draw lock icon
GNEViewNetHelper::LockIcon::drawLockIcon(this, getType(), myAdditionalGeometry.getShape().getCentroid(), E1InstantExaggeration);
// Draw additional ID
Expand Down
12 changes: 0 additions & 12 deletions src/netedit/elements/additional/GNELaneAreaDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,6 @@ GNELaneAreaDetector::drawGL(const GUIVisualizationSettings& s) const {
}
// draw parent and child lines
drawParentChildLines(s, s.additionalSettings.connectionColor);
// Start drawing adding an gl identificator
GLHelper::pushName(getGlID());
// push layer matrix
GLHelper::pushMatrix();
// translate to front
Expand All @@ -313,8 +311,6 @@ GNELaneAreaDetector::drawGL(const GUIVisualizationSettings& s) const {
drawRightGeometryPoint(s, d, myAdditionalGeometry.getShape().back(), myAdditionalGeometry.getShapeRotations().back(), E2Color);
// pop layer matrix
GLHelper::popMatrix();
// Pop name
GLHelper::popName();
// draw lock icon
GNEViewNetHelper::LockIcon::drawLockIcon(this, getType(), myAdditionalGeometry.getShape().getCentroid(), E2Exaggeration);
// Draw additional ID
Expand Down Expand Up @@ -377,8 +373,6 @@ GNELaneAreaDetector::drawLanePartialGL(const GUIVisualizationSettings& s, const
if (!s.drawForObjectUnderCursor) {
// obtain color
const RGBColor E2Color = drawUsingSelectColor() ? s.colorSettings.selectedAdditionalColor : s.detectorSettings.E2Color;
// Start drawing adding an gl identificator
GLHelper::pushName(getGlID());
// push layer matrix
GLHelper::pushMatrix();
// Start with the drawing of the area traslating matrix to origin
Expand All @@ -403,8 +397,6 @@ GNELaneAreaDetector::drawLanePartialGL(const GUIVisualizationSettings& s, const
}
// Pop layer matrix
GLHelper::popMatrix();
// Pop name
GLHelper::popName();
// draw additional ID
if (!s.drawForRectangleSelection) {
drawName(getCenteringBoundary().getCenter(), s.scale, s.addName);
Expand Down Expand Up @@ -451,8 +443,6 @@ GNELaneAreaDetector::drawJunctionPartialGL(const GUIVisualizationSettings& s, co
const auto d = s.getDetailLevel(E2DetectorWidth);
// get flag for show only contour
const bool onlyContour = myNet->getViewNet()->getEditModes().isCurrentSupermodeNetwork() ? myNet->getViewNet()->getNetworkViewOptions().showConnections() : false;
// Start drawing adding an gl identificator
GLHelper::pushName(getGlID());
// Add a draw matrix
GLHelper::pushMatrix();
// Start with the drawing of the area traslating matrix to origin
Expand Down Expand Up @@ -500,8 +490,6 @@ GNELaneAreaDetector::drawJunctionPartialGL(const GUIVisualizationSettings& s, co
}
// Pop last matrix
GLHelper::popMatrix();
// Pop name
GLHelper::popName();
}
}

Expand Down
8 changes: 0 additions & 8 deletions src/netedit/elements/additional/GNEOverheadWire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@ GNEOverheadWire::drawLanePartialGL(const GUIVisualizationSettings& s, const GNEP
// obtain color
const RGBColor overheadWireColorTop = drawUsingSelectColor() ? s.colorSettings.selectedAdditionalColor : s.additionalSettings.overheadWireColorTop;
const RGBColor overheadWireColorBot = drawUsingSelectColor() ? s.colorSettings.selectedAdditionalColor : s.additionalSettings.overheadWireColorBot;
// Start drawing adding an gl identificator
GLHelper::pushName(getGlID());
// push layer matrix
GLHelper::pushMatrix();
// Start with the drawing of the area traslating matrix to origin
Expand All @@ -305,8 +303,6 @@ GNEOverheadWire::drawLanePartialGL(const GUIVisualizationSettings& s, const GNEP
}
// Pop layer matrix
GLHelper::popMatrix();
// Pop name
GLHelper::popName();
// declare trim geometry to draw
const auto shape = (segment->isFirstSegment() || segment->isLastSegment()) ? overheadWireGeometry.getShape() : segment->getLane()->getLaneShape();
// draw dotted geometry
Expand Down Expand Up @@ -339,8 +335,6 @@ GNEOverheadWire::drawJunctionPartialGL(const GUIVisualizationSettings& s, const
// move to sides
overheadWireGeometryTop.moveGeometryToSide(overheadWireWidth * 0.5);
overheadWireGeometryBot.moveGeometryToSide(overheadWireWidth * -0.5);
// Start drawing adding an gl identificator
GLHelper::pushName(getGlID());
// Add a draw matrix
GLHelper::pushMatrix();
// Start with the drawing of the area traslating matrix to origin
Expand All @@ -355,8 +349,6 @@ GNEOverheadWire::drawJunctionPartialGL(const GUIVisualizationSettings& s, const
GUIGeometry::drawGeometry(s, myNet->getViewNet()->getPositionInformation(), overheadWireGeometryBot, 0.2);
// Pop last matrix
GLHelper::popMatrix();
// Pop name
GLHelper::popName();
// draw contours
if (segment->getPreviousLane()->getLane2laneConnections().exist(segment->getNextLane())) {
// get shape
Expand Down
4 changes: 0 additions & 4 deletions src/netedit/elements/additional/GNEPOI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,6 @@ GNEPOI::drawGL(const GUIVisualizationSettings& s) const {
const auto d = s.getDetailLevel(POIExaggeration);
// draw geometry only if we'rent in drawForObjectUnderCursor mode
if (!s.drawForObjectUnderCursor) {
// push name (needed for getGUIGlObjectsUnderCursor(...)
GLHelper::pushName(getGlID());
// draw inner polygon
if (myNet->getViewNet()->getFrontAttributeCarrier() == this) {
GUIPointOfInterest::drawInnerPOI(s, this, this, drawUsingSelectColor(), GLO_FRONTELEMENT,
Expand All @@ -376,8 +374,6 @@ GNEPOI::drawGL(const GUIVisualizationSettings& s) const {
drawLeftGeometryPoint(s, d, myShapeWidth.back(), -90, RGBColor::ORANGE);
drawRightGeometryPoint(s, d, myShapeWidth.front(), -90, RGBColor::ORANGE);
}
// pop name
GLHelper::popName();
// draw lock icon
GNEViewNetHelper::LockIcon::drawLockIcon(this, getType(), getPositionInView(), POIExaggeration);
}
Expand Down
4 changes: 0 additions & 4 deletions src/netedit/elements/additional/GNEParkingArea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ GNEParkingArea::drawGL(const GUIVisualizationSettings& s) const {
}
// draw parent and child lines
drawParentChildLines(s, s.additionalSettings.connectionColor);
// Start drawing adding an gl identificator
GLHelper::pushName(getGlID());
// Add a layer matrix
GLHelper::pushMatrix();
// translate to front
Expand Down Expand Up @@ -203,8 +201,6 @@ GNEParkingArea::drawGL(const GUIVisualizationSettings& s) const {
}
// pop layer matrix
GLHelper::popMatrix();
// Pop name
GLHelper::popName();
// draw lock icon
GNEViewNetHelper::LockIcon::drawLockIcon(this, getType(), getPositionInView(), parkingAreaExaggeration);
// Draw additional ID
Expand Down
4 changes: 0 additions & 4 deletions src/netedit/elements/additional/GNEParkingSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,6 @@ GNEParkingSpace::drawGL(const GUIVisualizationSettings& s) const {
}
// draw parent and child lines
drawParentChildLines(s, s.additionalSettings.connectionColor);
// push name
GLHelper::pushName(getGlID());
// push later matrix
GLHelper::pushMatrix();
// translate to front
Expand All @@ -250,8 +248,6 @@ GNEParkingSpace::drawGL(const GUIVisualizationSettings& s) const {
drawRightGeometryPoint(s, d, myShapeWidth.front(), angle - 90, contourColor);
// pop layer matrix
GLHelper::popMatrix();
// pop name
GLHelper::popName();
// draw lock icon
GNEViewNetHelper::LockIcon::drawLockIcon(this, getType(), myShapeLength.getPolygonCenter(), parkingAreaExaggeration);
// Draw additional ID
Expand Down
4 changes: 0 additions & 4 deletions src/netedit/elements/additional/GNEPoly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,6 @@ GNEPoly::drawGL(const GUIVisualizationSettings& s) const {
const RGBColor color = isAttributeCarrierSelected() ? s.colorSettings.selectionColor : getShapeColor();
const RGBColor invertedColor = color.invertedColor();
const RGBColor darkerColor = color.changedBrightness(-32);
// push name (needed for getGUIGlObjectsUnderCursor(...)
GLHelper::pushName(getGlID());
// push layer matrix
GLHelper::pushMatrix();
// translate to front
Expand Down Expand Up @@ -356,8 +354,6 @@ GNEPoly::drawGL(const GUIVisualizationSettings& s) const {
GNEViewNetHelper::LockIcon::drawLockIcon(this, getType(), getPositionInView(), polyExaggeration);
// pop layer matrix
GLHelper::popMatrix();
// pop name
GLHelper::popName();
// get name position
const Position& namePos = myPolygonGeometry.getShape().getPolygonCenter();
// draw name
Expand Down
8 changes: 0 additions & 8 deletions src/netedit/elements/additional/GNERerouterSymbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,6 @@ GNERerouterSymbol::drawGL(const GUIVisualizationSettings& s) const {
if (!s.drawForObjectUnderCursor) {
// draw parent and child lines
drawParentChildLines(s, s.additionalSettings.connectionColor);
// Start drawing adding an gl identificator (except in Move mode)
if (myNet->getViewNet()->getEditModes().networkEditMode != NetworkEditMode::NETWORK_MOVE) {
GLHelper::pushName(getParentAdditionals().front()->getGlID());
}
// push layer matrix
GLHelper::pushMatrix();
// translate to front
Expand Down Expand Up @@ -201,10 +197,6 @@ GNERerouterSymbol::drawGL(const GUIVisualizationSettings& s) const {
}
// pop layer matrix
GLHelper::popMatrix();
// Pop name
if (myNet->getViewNet()->getEditModes().networkEditMode != NetworkEditMode::NETWORK_MOVE) {
GLHelper::popName();
}
}
// draw dotted contour
for (const auto& symbolGeometry : mySymbolGeometries) {
Expand Down
4 changes: 0 additions & 4 deletions src/netedit/elements/additional/GNERouteProbe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ GNERouteProbe::drawGL(const GUIVisualizationSettings& s) const {
if (!s.drawForObjectUnderCursor) {
// draw parent and child lines
drawParentChildLines(s, s.additionalSettings.connectionColor);
// Start drawing adding an gl identificator
GLHelper::pushName(getGlID());
// Add layer matrix matrix
GLHelper::pushMatrix();
// translate to front
Expand Down Expand Up @@ -204,8 +202,6 @@ GNERouteProbe::drawGL(const GUIVisualizationSettings& s) const {
}
// pop layer matrix
GLHelper::popMatrix();
// Pop name
GLHelper::popName();
// draw additional name
drawAdditionalName(s);
}
Expand Down

0 comments on commit b084f04

Please sign in to comment.