Deleting a material set from a type now also purges usages from type instances

This commit is contained in:
Dion Moult
2021-08-08 20:56:31 +10:00
parent b696d302f9
commit 7abccbd713
3 changed files with 26 additions and 5 deletions
@@ -11,7 +11,12 @@ class Usecase:
def execute(self):
self.added_elements = set()
if self.settings["element"].is_a("IfcTypeProduct") and not self.file.by_guid(self.settings["element"].GlobalId):
if self.settings["element"].is_a("IfcTypeProduct"):
try:
self.file.by_guid(self.settings["element"].GlobalId)
return
except:
pass
return self.append_type_product()
def append_type_product(self):