[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>
This commit is contained in:
paul
2025-11-15 17:17:35 +08:00
committed by GitHub
parent 255c854d7e
commit c640c3dab2

View File

@@ -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: