Use name for imported objects rather than GUID if name is not null

This commit is contained in:
Thomas Krijnen
2011-09-22 11:35:03 +00:00
parent eda8fd0c25
commit 767f7b4090
+2 -2
View File
@@ -192,7 +192,7 @@ IfcGeomObjects::IfcGeomObject* _get() {
}
}
Ifc2x3::IfcProduct::ptr entity = *inner;
const std::string guid = entity->GlobalId();
const std::string name = entity->hasName() ? entity->Name() : entity->GlobalId();
gp_Trsf trsf;
try {
@@ -235,7 +235,7 @@ IfcGeomObjects::IfcGeomObject* _get() {
shape = new IfcGeomObjects::IfcMesh(shaperep->entity->id(),shapes);
}
return new IfcGeomObjects::IfcGeomObject(guid, Ifc2x3::Type::ToString(entity->type()), trsf, shape);
return new IfcGeomObjects::IfcGeomObject(name, Ifc2x3::Type::ToString(entity->type()), trsf, shape);
}
}