diff --git a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp index 3c34a129161674996cd5103243907068417f7daa..78c370524c3ce52a98b89412021b6feb81bb1808 100644 --- a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp +++ b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp @@ -331,8 +331,12 @@ bool XmlGmlInterface::write() polylineTag.setAttribute("id", QString::number(i)); std::string ply_name(""); - if (ply_vec->getNameOfElementByID(i, ply_name)) + if (ply_vec->getNameOfElementByID(i, ply_name)) { polylineTag.setAttribute("name", QString::fromStdString(ply_name)); + } else { + ply_name = std::to_string(i); + polylineTag.setAttribute("name", QString::fromStdString(ply_name)); + } plyListTag.appendChild(polylineTag);