From 4359769d54d5683da1e5c99225cc289d72ac1941 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Mon, 10 Jul 2023 14:13:34 +1000 Subject: [PATCH] See #3411. Sheets are now sorted alphabetically by default. --- src/blenderbim/blenderbim/tool/drawing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blenderbim/blenderbim/tool/drawing.py b/src/blenderbim/blenderbim/tool/drawing.py index 0d96881252..a993aa9bbb 100644 --- a/src/blenderbim/blenderbim/tool/drawing.py +++ b/src/blenderbim/blenderbim/tool/drawing.py @@ -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":