From c640c3dab254fef89b740921e562e8b1b76d5ca6 Mon Sep 17 00:00:00 2001 From: paul <40677073+paullee0@users.noreply.github.com> Date: Sat, 15 Nov 2025 17:17:35 +0800 Subject: [PATCH] [ArchStairs] Fix Landing property disable At-Each-Corner (#25278) * [ArchStairs] Fix Landing property disable At-Each-Corner Fix #24384 * Update src/Mod/BIM/ArchStairs.py Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com> * Update ArchStairs.py - Typo --------- Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com> --- src/Mod/BIM/ArchStairs.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Mod/BIM/ArchStairs.py b/src/Mod/BIM/ArchStairs.py index e64753056e..136f4757cc 100644 --- a/src/Mod/BIM/ArchStairs.py +++ b/src/Mod/BIM/ArchStairs.py @@ -397,7 +397,16 @@ class _Stairs(ArchComponent.Component): QT_TRANSLATE_NOOP("App::Property", "The type of landings of these stairs"), locked=True, ) - obj.Landings = ["None", "At center", "At each corner"] + 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" # Not implemented yet, remarked out at the moment # if not "Winders" in pl: @@ -2158,7 +2167,7 @@ class _Stairs(ArchComponent.Component): if wantLanding: # but not numOfSteps > 3, so no hasLanding print("Fewer than 4 steps, unable to create landing") - # TODO height shoulld follow edge's z info if any? + # TODO height should follow edge's z info if any? # Order of precedence in makeStraightStairs() - vHeight, hgt, edge height if present # setup height if height is None: # if not height: