From 94ba1a121dcb061773b18a15c08e829a35e66707 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 8 Oct 2022 15:16:53 +0200 Subject: [PATCH] #2486 store provenance to file also in simple type instances --- src/ifcparse/IfcParse.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index 8ce42ed780..780b6985bd 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -2056,6 +2056,11 @@ IfcUtil::IfcBaseClass* IfcFile::addEntity(IfcUtil::IfcBaseClass* entity, int id) // The mapping by entity instance name is updated. byid[new_id] = new_entity; + } else if (!new_entity->data().file) { + // For non-entity instances, no mappings are updated, but the file + // pointer has to be set, so that actual copies are created in subsequent + // times. + new_entity->data().file = this; } if (parsing_complete_ && ty->as_entity()) {