mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
fix #5047 - order IfcAnnotationTypes alphabetically.
and order types regardless of case.
This commit is contained in:
@@ -410,6 +410,7 @@ class AnnotationData:
|
||||
|
||||
results = [("0", "Untyped", "")]
|
||||
results.extend([(str(e.id()), e.Name or "Unnamed", e.Description or "") for e in relating_types])
|
||||
results.sort(key=lambda x: x[1].lower())
|
||||
return results
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -245,7 +245,7 @@ class AuthoringData:
|
||||
if not ifc_class and ifc_classes:
|
||||
ifc_class = ifc_classes[0][0]
|
||||
if ifc_class:
|
||||
elements = sorted(tool.Ifc.get().by_type(ifc_class), key=lambda s: s.Name or "Unnamed")
|
||||
elements = sorted(tool.Ifc.get().by_type(ifc_class), key=lambda s: (s.Name or "Unnamed").lower())
|
||||
results.extend(elements)
|
||||
return [(str(e.id()), e.Name or "Unnamed", e.Description or "") for e in results]
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user