Skip to content
This repository was archived by the owner on Nov 24, 2024. It is now read-only.

Commit dca2e58

Browse files
committed
Fix bug where you shouldn't be able to reassign classes of non-rooted elements
1 parent 3810255 commit dca2e58

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • src/blenderbim/blenderbim/bim/module/root

src/blenderbim/blenderbim/bim/module/root/ui.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def draw(self, context):
4141
row.label(text=name)
4242
row.operator("bim.copy_class", icon="DUPLICATE", text="")
4343
row.operator("bim.unlink_object", icon="UNLINKED", text="")
44-
row.operator("bim.enable_reassign_class", icon="GREASEPENCIL", text="")
44+
if IfcStore.get_file().by_id(props.ifc_definition_id).is_a("IfcRoot"):
45+
row.operator("bim.enable_reassign_class", icon="GREASEPENCIL", text="")
4546
if context.selected_objects:
4647
row.operator("bim.unassign_class", icon="X", text="")
4748
else:

0 commit comments

Comments
 (0)