From 94e2be0731a434bcd70a0f57ea3866331f2215f2 Mon Sep 17 00:00:00 2001 From: Sergi Hernandez Juan <shernand@iri.upc.edu> Date: Thu, 4 Jun 2020 11:29:54 +0200 Subject: [PATCH] Solved a bug when saving the xodr file: the information from the previous signal or object was concatenated to the new one. --- OpenRoadEd/OpenDrive/OpenDriveXmlWriter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenRoadEd/OpenDrive/OpenDriveXmlWriter.cpp b/OpenRoadEd/OpenDrive/OpenDriveXmlWriter.cpp index 07dcf3c..1902202 100644 --- a/OpenRoadEd/OpenDrive/OpenDriveXmlWriter.cpp +++ b/OpenRoadEd/OpenDrive/OpenDriveXmlWriter.cpp @@ -853,6 +853,7 @@ bool OpenDriveXmlWriter::WriteObjects (TiXmlElement *node, Road* road) TiXmlElement *object_node = new TiXmlElement("object"); nodeObjects->LinkEndChild(object_node); + text.str(""); text << setprecision(16) << setiosflags (ios_base::scientific) << object->GetS(); object_node->SetAttribute("s",text.str()); text.str(""); @@ -920,6 +921,7 @@ bool OpenDriveXmlWriter::WriteSignals (TiXmlElement *node, Road* road) TiXmlElement *signal_node = new TiXmlElement("signal"); nodeSignals->LinkEndChild(signal_node); + text.str(""); text << setprecision(16) << setiosflags (ios_base::scientific) << signal->GetS(); signal_node->SetAttribute("s",text.str()); text.str(""); -- GitLab