Skip to content
Snippets Groups Projects
Commit 94e2be07 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Solved a bug when saving the xodr file: the information from the previous...

Solved a bug when saving the xodr file: the information from the previous signal or object was concatenated to the new one.
parent e2ed4cec
No related branches found
No related tags found
No related merge requests found
...@@ -853,6 +853,7 @@ bool OpenDriveXmlWriter::WriteObjects (TiXmlElement *node, Road* road) ...@@ -853,6 +853,7 @@ bool OpenDriveXmlWriter::WriteObjects (TiXmlElement *node, Road* road)
TiXmlElement *object_node = new TiXmlElement("object"); TiXmlElement *object_node = new TiXmlElement("object");
nodeObjects->LinkEndChild(object_node); nodeObjects->LinkEndChild(object_node);
text.str("");
text << setprecision(16) << setiosflags (ios_base::scientific) << object->GetS(); text << setprecision(16) << setiosflags (ios_base::scientific) << object->GetS();
object_node->SetAttribute("s",text.str()); object_node->SetAttribute("s",text.str());
text.str(""); text.str("");
...@@ -920,6 +921,7 @@ bool OpenDriveXmlWriter::WriteSignals (TiXmlElement *node, Road* road) ...@@ -920,6 +921,7 @@ bool OpenDriveXmlWriter::WriteSignals (TiXmlElement *node, Road* road)
TiXmlElement *signal_node = new TiXmlElement("signal"); TiXmlElement *signal_node = new TiXmlElement("signal");
nodeSignals->LinkEndChild(signal_node); nodeSignals->LinkEndChild(signal_node);
text.str("");
text << setprecision(16) << setiosflags (ios_base::scientific) << signal->GetS(); text << setprecision(16) << setiosflags (ios_base::scientific) << signal->GetS();
signal_node->SetAttribute("s",text.str()); signal_node->SetAttribute("s",text.str());
text.str(""); text.str("");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment