mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Project Library UI - fix library asset count not considering assets from sublibraries
As a result if all elements were assigned to sublibrary, it was showing that library itself has 0 assets and wasn't allowing to expand to see the sublibraries.
This commit is contained in:
@@ -372,6 +372,10 @@ class Project(bonsai.core.tool.Project):
|
||||
props = cls.get_project_props()
|
||||
for project_library in libraries:
|
||||
library_elements = tool.Project.get_project_library_elements(project_library)
|
||||
subhierarchy = libraries[project_library]
|
||||
for sublibrary in subhierarchy:
|
||||
sublibrary_elements = tool.Project.get_project_library_elements(sublibrary)
|
||||
library_elements.update(sublibrary_elements)
|
||||
props.add_library_project_library(
|
||||
project_library.Name or "Unnamed", len(library_elements), project_library.id()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user