Don't add inverse references to the entity being added itself.

This commit is contained in:
Thomas Krijnen
2015-02-19 14:42:19 +00:00
parent 573655e5ef
commit b0ccf69870
+1
View File
@@ -1117,6 +1117,7 @@ IfcUtil::IfcBaseClass* IfcFile::addEntity(IfcUtil::IfcBaseClass* entity) {
} catch (...) {}
for (IfcEntityList::it it = entity_attributes->begin(); it != entity_attributes->end(); ++it) {
IfcUtil::IfcBaseClass* entity_attribute = *it;
if (*it == entity) continue;
try {
if (!IfcSchema::Type::IsSimple(entity_attribute->type())) {
unsigned entity_attribute_id = entity_attribute->entity->id();