Skip to content

Commit

Permalink
Fixed problem saving vehicles over TAZs. Refs #13311
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Jun 22, 2023
1 parent e2d24ae commit 911ee17
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/netedit/elements/demand/GNEVehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ GNEVehicle::GNEVehicle(SumoXMLTag tag, GNENet* net, GNEDemandElement* vehicleTyp
// mark taz parameters as set
parametersSet |= VEHPARS_FROM_TAZ_SET;
parametersSet |= VEHPARS_TO_TAZ_SET;
fromTaz = fromTAZ->getID();
toTaz = toTAZ->getID();
// adjust default flow attributes
adjustDefaultFlowAttributes(this);
}
Expand Down Expand Up @@ -2195,6 +2197,8 @@ GNEVehicle::setAttribute(SumoXMLAttr key, const std::string& value) {
case SUMO_ATTR_FROM_TAZ: {
// change first additional
replaceFirstParentAdditional(SUMO_TAG_TAZ, value);
// set taz manually
fromTaz = value;
// compute vehicle
computePathElement();
updateSpreadStackGeometry = true;
Expand All @@ -2203,6 +2207,8 @@ GNEVehicle::setAttribute(SumoXMLAttr key, const std::string& value) {
case SUMO_ATTR_TO_TAZ: {
// change last additional
replaceLastParentAdditional(SUMO_TAG_TAZ, value);
// set taz manually
toTaz = value;
// compute vehicle
computePathElement();
updateSpreadStackGeometry = true;
Expand Down

0 comments on commit 911ee17

Please sign in to comment.