diff --git a/B06_Section/B06_Section_UI_Cross_View.ts b/B06_Section/B06_Section_UI_Cross_View.ts index 7fa0738f2..2fb647b19 100644 --- a/B06_Section/B06_Section_UI_Cross_View.ts +++ b/B06_Section/B06_Section_UI_Cross_View.ts @@ -321,7 +321,11 @@ export function createCrossSectionCard( setChipActive(null); onAreaSelect?.(section.station_id, null); } - if (!isSelected) onSelect(section.station_id); + if (!isSelected) { + // 첫 누름 = 이 선 — 남은 부재 고름(도수로 띠 등)이 카드 고름에 되살아나 선을 풀지 않게(295-4) + if (activeRevet === null) revetOffset?.select(section.chainage_m, null); + onSelect(section.station_id); + } } setLineActive(next); }; diff --git a/resources/tester/test_137_design_pick.py b/resources/tester/test_137_design_pick.py index af7412b9a..fb46749b6 100644 --- a/resources/tester/test_137_design_pick.py +++ b/resources/tester/test_137_design_pick.py @@ -97,7 +97,7 @@ def test_카드_배선_하나만() -> None: """137-3 — 선을 고르면 벽 · 본체 · 면적을 풀고 카드도 고름 · 다른 고름은 선을 풂.""" view = _src("B06_Section/B06_Section_UI_Cross_View.ts") assert "const pickLine = (index: number): void => {" in view - assert "if (!isSelected) onSelect(section.station_id);" in view + assert "if (activeRevet === null) revetOffset?.select(section.chainage_m, null);" in view assert view.count("dropLine();") >= 4 # 본체 · 벽 · 카드 풂 · 면적 assert "setLineActive(pickedLineAt(section.station_id));" in view # 다시 그려도 되살림 assert "zoomBar.prepend(linePick.label);" in view # 치수 = [+ − ⤢] 왼쪽 diff --git a/resources/tester/test_295_pick_order_detail.py b/resources/tester/test_295_pick_order_detail.py index f69390536..4bc652b36 100644 --- a/resources/tester/test_295_pick_order_detail.py +++ b/resources/tester/test_295_pick_order_detail.py @@ -116,3 +116,24 @@ def test_배선(): assert "detailHomeView(layerPoints(layer), [cx, cy], plot, homeScale, 16)" in detail for name in ("B06_Section_UI_Cross_View.ts", "B06_Section_UI_Cross_Detail_Select.ts"): assert len(_read(name).splitlines()) <= 700 + + +def test_보라_선_첫_누름은_그_선_295_4(): + """안 골라진 카드의 성토 사면선 첫 누름 — 남은 부재키(도수로 띠)를 먼저 풀어 카드 고름이 되살리지 않음.""" + proc = subprocess.run( # noqa: S603 — 고정 실행 파일 + ["node", os.path.join(HERE, "helper_294_7_ford_slab_pick.cjs")], + capture_output=True, + text=True, + encoding="utf-8", + timeout=60, + ) + assert proc.returncode == 0, proc.stderr + first = json.loads(proc.stdout)["firstLine"] + assert first["oldKey"] == "chute" # 옛 길 = 카드 고름이 도수로 띠 부재키를 지킴 → 선 풀림 + assert first["newKey"] is None + view = " ".join(_read("B06_Section_UI_Cross_View.ts").split()) + assert "if (!isSelected) { // 첫 누름 = 이 선" in view + assert ( + "if (activeRevet === null) revetOffset?.select(section.chainage_m, null); onSelect(section.station_id);" + in view + )