mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix issue renaming objects first time project was loaded after 962b8fa
E.g. if you load a project and try to rename some element to "test" it will renamed to "test" instead of "IfcWindow/test" e.g. Since we relid on `obj.name` handler to set `.is_renaming` back to `False`, it didn't set it back to False when project was just loaded and renamed object was not yet linked to ifc element and name handler is not yet setup. Another option was to check whether object is linked before changing `is_renaming` but just setting it to False should be more more explicit.
This commit is contained in:
@@ -292,3 +292,4 @@ class Root(blenderbim.core.tool.Root):
|
||||
obj.BIMObjectProperties.is_renaming = True
|
||||
name = getattr(element, "Name", getattr(element, "AxisTag", None))
|
||||
obj.name = "{}/{}".format(element.is_a(), name or "Unnamed")
|
||||
obj.BIMObjectProperties.is_renaming = False
|
||||
|
||||
Reference in New Issue
Block a user