Skip to content

Commit

Permalink
fix #14462
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Mar 5, 2024
1 parent 79b7cf8 commit ea3c188
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/netedit/elements/demand/GNERide.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,25 +201,13 @@ GNERide::drawJunctionPartialGL(const GUIVisualizationSettings& s, const GNEPathM

GNELane*
GNERide::getFirstPathLane() const {
// get previous plan
const auto previousPlan = getParentDemandElements().at(0)->getPreviousChildDemandElement(this);
if (previousPlan) {
// sue the last pathLane of previous plan
return previousPlan->getLastPathLane();
} else {
return getParentEdges().front()->getLaneByDisallowedVClass(SVC_PEDESTRIAN);
}
return getFirstPlanPathLane();
}


GNELane*
GNERide::getLastPathLane() const {
// check if personPlan ends in a BusStop
if (getParentAdditionals().size() > 0) {
return getParentAdditionals().front()->getParentLanes().front();
} else {
return getParentEdges().back()->getLaneByDisallowedVClass(SVC_PEDESTRIAN);
}
return getLastPlanPathLane();
}


Expand Down

0 comments on commit ea3c188

Please sign in to comment.