mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
Fix #1456. Improve usability when a project library only has a single class type in it.
This commit is contained in:
@@ -144,7 +144,7 @@ class ChangeLibraryElement(bpy.types.Operator):
|
||||
[ifc_classes.add(e.is_a()) for e in elements]
|
||||
while len(self.props.library_elements) > 0:
|
||||
self.props.library_elements.remove(0)
|
||||
if len(ifc_classes) == 1:
|
||||
if len(ifc_classes) == 1 and list(ifc_classes)[0] == self.element_name:
|
||||
for element in elements:
|
||||
new = self.props.library_elements.add()
|
||||
new.name = element.Name or "Unnamed"
|
||||
|
||||
Reference in New Issue
Block a user