the feature-tree row needs CHROME_DY too — the last chrome constant that did not carry it

Four of this fork's five absolute chrome coordinates were shifted by CHROME_DY when the
ladder was first brought up here (DESIGN_TAB, CONSTRUCTION_CHECKBOX, CON_BTN_Y,
CONFIRM_BTN). TREE_ROW0 was not, because it is declared above the CHROME_DY block and was
simply never in view.

The unshifted click lands 26 px below the first tree row, just past its 23 px height, so
the row is never selected and Delete does nothing. reset_document then spends 40 rounds on
it and dies with "could not empty the feature tree" — a message that names the feature
tree, which is not the fault. The same 26 px is why confirm_and_reopen's double-click did
not reopen the sketch, which surfaced as "sketch_describe: no sketch is open" three frames
away from the cause.

Measured, not inferred: the Sketch1 row centre reads y=241 on the rig at 1920x1080 with
the window at (0,0), against the constant's 215. CONFIRM_BTN was checked in the same pass
from a screenshot taken in CONSTRAIN mode and is correct at (1751, 101).

With this, the four new constraint rungs hold 20/20 on this fork's rig, driving the binary
built from 648b930e75 (BuildID 56417445) — so the DistanceX/Y fix ported here is now
exercised, not merely parity-checked.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MrMzTpAf78U4NG2M8jfvHY
This commit is contained in:
Tommaso Bianchi
2026-08-31 10:52:34 +02:00
co-authored by Claude Opus 5
parent 648b930e75
commit d35d33971a
+10 -6
View File
@@ -203,12 +203,6 @@ def leave_sketch():
time.sleep(0.5)
# Feature-tree rows, measured on the rig at 1920x1080: first row centre, then 23 px apart.
# x=300, not the label: a second click ON the label opens the inline rename, and Delete then
# edits the text instead of removing the feature.
TREE_ROW0 = (300, 215)
# EVERY absolute chrome coordinate below is written in the Snapmaker fork's layout and then
# shifted by CHROME_DY, because this fork keeps mainline OrcaSlicer's top row (File / save /
# undo / redo / Calibration, with the document title) which that fork does not have. The whole
@@ -223,6 +217,16 @@ CHROME_DY = int(os.environ.get("SNAPORCA_CHROME_DY", "26"))
DESIGN_TAB = (128, 29 + CHROME_DY)
# Feature-tree rows, measured on the rig at 1920x1080: first row centre, then 23 px apart.
# x=300, not the label: a second click ON the label opens the inline rename, and Delete then
# edits the text instead of removing the feature.
#
# CHROME_DY applies here too, and this was the one chrome constant that did not carry it. The
# unshifted click lands 26 px BELOW the first row -- just past its 23 px height -- so the row is
# never selected, Delete does nothing, and reset_document spends 40 rounds on it before dying
# with "could not empty the feature tree". That names the feature tree, which is not the fault.
TREE_ROW0 = (300, 215 + CHROME_DY)
def go_design():
"""Make sure the Design tab is in front — loading a project lands on Prepare."""