Skip to content

Commit

Permalink
Updated GNEEdge. Refs #13894
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Dec 19, 2023
1 parent 99e0abc commit 77b49ec
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
41 changes: 22 additions & 19 deletions src/netedit/elements/network/GNEEdge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ GNEEdge::drawGL(const GUIVisualizationSettings& s) const {
GNEViewNetHelper::LockIcon::drawLockIcon(this, getType(), getPositionInView(), 1);
}
// draw childrens
drawChildrens(s);
drawChildrens(s, d);
// draw dotted geometry
myContour.drawDottedContourEdge(s, d, this, true, true, s.dottedContourSettings.segmentWidth);
}
Expand Down Expand Up @@ -2699,28 +2699,31 @@ GNEEdge::drawLaneStopOffset(const GUIVisualizationSettings& s, const GUIVisualiz


void
GNEEdge::drawChildrens(const GUIVisualizationSettings& s) const {
// draw child additional
for (const auto& additional : getChildAdditionals()) {
additional->drawGL(s);
}
// draw person stops
if (myNet->getViewNet()->getNetworkViewOptions().showDemandElements() && myNet->getViewNet()->getDataViewOptions().showDemandElements()) {
for (const auto& stopEdge : getChildDemandElements()) {
if ((stopEdge->getTagProperty().getTag() == GNE_TAG_STOPPERSON_EDGE) || (stopEdge->getTagProperty().getTag() == GNE_TAG_STOPCONTAINER_EDGE)) {
stopEdge->drawGL(s);
GNEEdge::drawChildrens(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d) const {
// check if draw children elements
if (s.drawForObjectUnderCursor || (d <= GUIVisualizationSettings::Detail::Additionals)) {
// draw child additional
for (const auto& additional : getChildAdditionals()) {
additional->drawGL(s);
}
// draw person stops
if (myNet->getViewNet()->getNetworkViewOptions().showDemandElements() && myNet->getViewNet()->getDataViewOptions().showDemandElements()) {
for (const auto& stopEdge : getChildDemandElements()) {
if ((stopEdge->getTagProperty().getTag() == GNE_TAG_STOPPERSON_EDGE) || (stopEdge->getTagProperty().getTag() == GNE_TAG_STOPCONTAINER_EDGE)) {
stopEdge->drawGL(s);
}
}
}
}
// draw vehicles
const std::map<const GNELane*, std::vector<GNEDemandElement*> > vehiclesMap = getVehiclesOverEdgeMap();
for (const auto& vehicleMap : vehiclesMap) {
for (const auto& vehicle : vehicleMap.second) {
vehicle->drawGL(s);
// draw vehicles
const std::map<const GNELane*, std::vector<GNEDemandElement*> > vehiclesMap = getVehiclesOverEdgeMap();
for (const auto& vehicleMap : vehiclesMap) {
for (const auto& vehicle : vehicleMap.second) {
vehicle->drawGL(s);
}
}
// draw TAZ elements
drawTAZElements(s);
}
// draw TAZ elements
drawTAZElements(s);
}


Expand Down
2 changes: 1 addition & 1 deletion src/netedit/elements/network/GNEEdge.h
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ class GNEEdge : public GNENetworkElement, public GNECandidateElement {
void drawEdgeShape(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d) const;

/// @brief draw children
void drawChildrens(const GUIVisualizationSettings& s) const;
void drawChildrens(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d) const;

/// @brief draw TAZElements
void drawTAZElements(const GUIVisualizationSettings& s) const;
Expand Down

0 comments on commit 77b49ec

Please sign in to comment.