BIM: Improve ArchStairs Landings code

See https://github.com/FreeCAD/FreeCAD/pull/25278#discussion_r2531791450
This commit is contained in:
Roy-043
2025-11-16 11:27:46 +01:00
committed by Max Wilfinger
parent e9227a6c8a
commit 1eb3742dc7

View File

@@ -399,14 +399,9 @@ class _Stairs(ArchComponent.Component):
)
landingsEnum = ["None", "At center"]
if not obj.getEnumerationsOfProperty("Landings") == landingsEnum:
landingsCur = obj.Landings
obj.Landings = landingsEnum
# For a new object landingsCur is None.
# For an object with the old enumeration it is "None", "At center" or "At each corner".
if landingsCur == "At center":
obj.Landings = landingsCur
else:
obj.Landings = "None"
# For an object with the old enumeration: ["None", "At center", "At each corner"],
# "At each corner" is automatically replaced by "None". Other values are kept.
# Not implemented yet, remarked out at the moment
# if not "Winders" in pl: