fix(M02): 도면으로 보내기 범위 — 면적 상세가 선 뒤에도 시트 첫 고름 유지 · 범위 없으면 알림(41-3)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BVPp2o6Mh2FZJr72yW3ofZ
This commit is contained in:
2026-10-04 23:00:05 +09:00
co-authored by Claude Opus 5.5
parent 4a264d961e
commit 48a746d5b7
@@ -65,6 +65,7 @@ const TEXT = {
saveFirst: "저장 안 한 고침이 있음 — 저장하고 보낼까요?",
saveLabel: "저장하고 보내기",
failed: "표를 못 만듦 — {value}",
noRange: "보낼 범위를 시트에서 먼저 고름",
place: "도면에서 표를 놓을 자리를 누름(Esc = 그만)",
noPlace: "이 도면 화면은 표 놓기를 아직 못 함",
stale: "면적산출 값이 바뀐 표 {n}개",
@@ -175,7 +176,7 @@ export function createAreaToDrawing(opt: AreaToDrawingOptions): AreaToDrawing {
});
async function send(at: Selection): Promise<void> {
if (!range) return;
if (!range) return showToast(TEXT.noRange, "error");
if (opt.isDirty()) {
if (!(await showConfirmDialog(TEXT.saveFirst, TEXT.saveLabel))) return;
await opt.save();
@@ -247,7 +248,7 @@ export function createAreaToDrawing(opt: AreaToDrawingOptions): AreaToDrawing {
return {
select: (s) => (range = { 시트: s.시트, 범위: s.범위 }),
onArea: (at, readOnly, slot) => {
range = null;
// 범위는 그대로 — 시트가 처음 고름(A1)을 이 갈고리보다 먼저 알림
if (readOnly || at.layer === "project") return;
const button = createButton({ label: TEXT.send, variant: "ghost", size: "sm" });
button.title = TEXT.sendTip;
@@ -258,6 +259,7 @@ export function createAreaToDrawing(opt: AreaToDrawingOptions): AreaToDrawing {
onDrawing: (raw, at, doc) => {
const handle = raw as TableHandle;
shown = `${at.layer}:${at.name}`;
range = null; // 면적 상세를 떠남
fresh = new Map();
latest = new Map();
const give =