See #3411. Sheets are now sorted alphabetically by default.

This commit is contained in:
Dion Moult
2023-07-10 14:13:34 +10:00
parent 4eba6bd6c0
commit 4359769d54
+1 -1
View File
@@ -657,7 +657,7 @@ class Drawing(blenderbim.core.tool.Drawing):
expanded_sheets = {s.ifc_definition_id for s in props.sheets if s.is_expanded}
props.sheets.clear()
sheets = [d for d in tool.Ifc.get().by_type("IfcDocumentInformation") if d.Scope == "SHEET"]
for sheet in sheets:
for sheet in sorted(sheets, key=lambda s: getattr(s, "Identification", getattr(s, "DocumentId", None))):
new = props.sheets.add()
new.ifc_definition_id = sheet.id()
if tool.Ifc.get_schema() == "IFC2X3":