fix(B07): 도각을 배경으로 굳혀 새 선이 잠금 도면층에 떨어지지 않게 한다

- state.setActiveLayerId(): 잠금 도면층(도각·원지반) 요청은 잠금 아닌 첫 층으로
  돌린다. 브리지·자동백업 복구·JSON 가져오기·도면층 패널·리본이 모두 이 함수를
  지나므로 가드를 한 곳에 뒀다. 잠금 아닌 층이 없으면 요청값 유지.
- RibbonWidgets: 「현재 도면층」 목록에서 잠금층을 뺀다(현재 층이 잠금이면 유지).
- Cover 엔진: 표지에 잠금 아닌 「주기」 도면층을 실어 덧그릴 자리를 만든다.
  표지는 엔티티가 전부 도각(잠금)이라 가드만으로는 그릴 곳이 없었다.
- state.resetUndoBaseline(): 도면 적재를 되돌리기 바닥으로 세운다. 첫 Ctrl+Z가
  도면을 싣기 전 빈 상태로 되돌아가 화면이 백지가 되던 결함을 닫는다.
- debug-hook: 검증용 snap() 창구 추가. state.test.ts 3건 신규.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-01 13:58:08 +09:00
co-authored by Claude Opus 5
parent 7377c35b7d
commit 64d944eb0f
7 changed files with 87 additions and 8 deletions
@@ -117,11 +117,15 @@ export const LayersWidget: FC = () => {
<label className="cad-prop cad-prop--wide" title="현재 도면층">
<span> </span>
<select value={activeLayerId} onChange={(event) => setActiveLayerId(event.target.value)}>
{layers.map((layer) => (
<option key={layer.id} value={layer.id}>
{layer.name}
</option>
))}
{/* 잠금 도면층(배경)은 고를 수 없으니 보여 주지 않는다. 현재 층이 잠금이면
(전부 잠금인 도면) 표시가 비지 않게 그 항목만 남긴다. */}
{layers
.filter((layer) => !layer.isLocked || layer.id === activeLayerId)
.map((layer) => (
<option key={layer.id} value={layer.id}>
{layer.name}
</option>
))}
</select>
</label>
<button