Fix mistake in 96bdda305 - expose IfcApplication purge to UI

Noticed a mistake when merge was included twice for applications, instead of including purge+merge.
This commit is contained in:
Andrej730
2025-06-18 19:08:37 +05:00
parent 9af15aeb0b
commit cbd78506ce
+6 -19
View File
@@ -635,23 +635,10 @@ class BIM_PT_purge(Panel):
layout.operator("bim.purge_unused_objects", text="Purge Unused Types").object_type = "TYPE"
layout.operator("bim.purge_unused_openings", text="Purge Unused Openings in Selected Objects")
row = layout.row(align=True)
row.label(text="Materials: ")
row.operator("bim.purge_unused_objects", text="Purge Unused").object_type = "MATERIAL"
row.operator("bim.merge_identical_objects", text="Merge Identical").object_type = "MATERIAL"
MERGEABLE_OBJECT_TYPES = ("MATERIAL", "STYLE", "ORGANIZATION", "APPLICATION")
row = layout.row(align=True)
row.label(text="Styles: ")
row.operator("bim.purge_unused_objects", text="Purge Unused").object_type = "STYLE"
row.operator("bim.merge_identical_objects", text="Merge Identical").object_type = "STYLE"
row = layout.row(align=True)
row.label(text="Organizations: ")
row.operator("bim.purge_unused_objects", text="Purge Unused").object_type = "ORGANIZATION"
row.operator("bim.merge_identical_objects", text="Merge Identical").object_type = "ORGANIZATION"
row = layout.row(align=True)
row.label(text="Applications: ")
row.operator("bim.merge_identical_objects", text="Merge Identical").object_type = "APPLICATION"
row.operator("bim.merge_identical_objects", text="Merge Identical").object_type = "APPLICATION"
for object_type in MERGEABLE_OBJECT_TYPES:
row = layout.row(align=True)
row.label(text=f"{object_type.capitalize()}:")
row.operator("bim.purge_unused_objects", text="Purge Unused").object_type = object_type
row.operator("bim.merge_identical_objects", text="Merge Identical").object_type = object_type