Fix bug where editing AxisTag didn't change the grid axis name

This commit is contained in:
Dion Moult
2024-09-06 23:10:37 +10:00
parent be71eb274b
commit 4c68ec6f82
2 changed files with 3 additions and 1 deletions
@@ -107,6 +107,9 @@ class EditAttributes(bpy.types.Operator, tool.Ifc.Operator):
attributes = bonsai.bim.helper.export_attributes(props.attributes, callback=callback)
ifcopenshell.api.run("attribute.edit_attributes", self.file, product=product, attributes=attributes)
if (name := tool.Loader.get_name(product)) and obj.name != name:
obj.name = name
bpy.ops.bim.disable_editing_attributes(obj=obj.name)
return {"FINISHED"}
@@ -26,7 +26,6 @@ from bpy.app.handlers import persistent
@persistent
def load_post(*args):
ifcopenshell.api.add_pre_listener("attribute.edit_attributes", "Bonsai.Root.SyncName", root.sync_name)
ifcopenshell.api.add_pre_listener("style.edit_presentation_style", "Bonsai.Root.SyncStyleName", root.sync_name)
ifcopenshell.api.add_post_listener(