diff --git a/B05_Profile/B05_Profile_UI_Structures_Panel.ts b/B05_Profile/B05_Profile_UI_Structures_Panel.ts index 207781293..81f728bd9 100644 --- a/B05_Profile/B05_Profile_UI_Structures_Panel.ts +++ b/B05_Profile/B05_Profile_UI_Structures_Panel.ts @@ -573,8 +573,16 @@ export function createStructuresSection( }, getStructures: () => [...structures], setPipeFacilities(pipes) { + const before = pipeFacilities; pipeFacilities = pipes.map((pipe) => ({ ...pipe })); followPipeList(panelContext, pipeFacilities); + // 열린 관 폼 — 값이 밖에서 바뀌면(되돌리기 · 다른 보기) 새 값으로 다시 엶 · 고치던 실시간 반영 · 임시 배치는 + // 둠(472-5 · 옛 칸 값이 다음 조작에 되쓰이던 흠) + const at = selectedPipeChainage; + if (at === null || applyingLive || tempPipeChainage !== null) return; + const near = (pipe: PipeFacilityItem) => Math.abs(pipe.chainage_m - at) < PIPE_MATCH_M; + const now = pipeFacilities.find(near); + if (now && JSON.stringify(now) !== JSON.stringify(before.find(near))) loadPipeForm(now); }, selectPipeByChainage(chainageM) { if (chainageM !== null) callbacks.onReveal?.(); diff --git a/resources/tester/test_472_5_shop_owner.py b/resources/tester/test_472_5_shop_owner.py index e288c3736..3ed88db8b 100644 --- a/resources/tester/test_472_5_shop_owner.py +++ b/resources/tester/test_472_5_shop_owner.py @@ -116,5 +116,9 @@ def test_배선() -> None: assert panel.index("seen.structures = JSON.stringify(structures);") < panel.index( "writePendingStructures(deps.projectId, structures);" ) + # 열린 관 폼 — 밖에서 바뀐 값(되돌리기 · 다른 보기)으로 다시 엶(옛 칸 값 되쓰던 흠) + form = _read("B05_Profile", "B05_Profile_UI_Structures_Panel.ts") + assert "if (at === null || applyingLive || tempPipeChainage !== null) return;" in form + assert "JSON.stringify(now) !== JSON.stringify(before.find(near))) loadPipeForm(now);" in form history = _read("B05_Profile", "B05_Profile_UI_Profile_History.ts") assert "announceDesignStore(projectId);" in history