MAINT-5786 FIXED Redundant sibling index suffix on uploaded mesh object names.

master
andreykproductengine 2016-05-12 17:46:20 +03:00
parent 54bbf95f26
commit 5048402da8
1 changed files with 5 additions and 1 deletions

View File

@ -2235,7 +2235,11 @@ std::string LLDAELoader::getElementLabel(daeElement *element)
// retrieve index to distinguish items inside same parent
size_t ind = 0;
parent->getChildren().find(element, ind);
index_string = "_" + boost::lexical_cast<std::string>(ind);
if (ind > 0)
{
index_string = "_" + boost::lexical_cast<std::string>(ind);
}
// if parent has a name or ID, use it
std::string name = parent->getAttribute("name");