# v0.1.261 — QA-046 Delete/Duplicate 버튼 selection 의존 활성화

- 버전: v0.1.261
- 분류: 48th stable seal (v0.1.366) 일괄 봉인 사이클
- 다운로드: [factory00-windows-x64-v0.1.261.zip](../../downloads/archive/factory00-windows-x64-v0.1.261.zip) (archive 보존)
- 캡처: [qa-screenshots/v0.1.261/](../../qa-screenshots/v0.1.261/)

---

## 협업자 PM 회신
QA-046 [P2] — 미선택 상태에서 Delete/Duplicate 버튼 활성 유지 (스펙 위반).

## fix

### UpdateEditButtonsEnabled() 헬퍼 + Update polling
`csharpButton _editDeleteBtnRef;
Button _editDupBtnRef;
bool _lastHasSelection = true;   // 초기 강제 갱신 트리거
void UpdateEditButtonsEnabled()
{
    bool hasSelection = _selectedPart != null
        || (_selectedParts != null && _selectedParts.Count > 0);
    if (hasSelection == _lastHasSelection) return;
    _lastHasSelection = hasSelection;
    if (_editDeleteBtnRef != null) _editDeleteBtnRef.SetEnabled(hasSelection);
    if (_editDupBtnRef != null)    _editDupBtnRef.SetEnabled(hasSelection);
}
`Update() 첫 부분에서 호출. 비교 후 변화 시만 SetEnabled (오버헤드 0).

### selection 진입점 다수 -> polling 일관
selection 변경처:
- 씬 클릭 (PickPartUnderMouse)- 부품 리스트 click- Ctrl+A (Select All)- drag-select- Esc (Deselect)- 컨텍스트 메뉴 select위 5+ 경로에 각각 helper 호출 추가 vs Update polling — polling이 단순 + 무회귀.

## 함께 처리된 답변 (handshake.md에 명시)
- **QA-062 (Edit Tab 툴팁)**: 코드 검증 — 모든 버튼에 tooltip 이미 존재 (Ribbon.uxml L49~54). 협업자 v0.1.240 보고 -> 이후 fix 완료된 듯. 별도 변경 X.- **QA-063 (다중 선택 Delete 미동작)**: v0.1.252 BatchDelete (DeleteCommand List)에서 fix 완료. 별도 변경 X.
## 변경 파일
- Assets/Scripts/Game/Factory00Bootstrap.cs (+15라인) — Button ref 저장 + UpdateEditButtonsEnabled helper + Update 호출- ProjectSettings/ProjectSettings.asset — bundleVersion 0.1.260 -> 0.1.261
## 검증 시나리오

### QA-046
1. 시작 직후 (선택 없음) -> Delete/Duplicate 버튼 grey (비활성)
2. 부품 클릭 (선택) -> 두 버튼 활성
3. Esc (Deselect) -> 두 버튼 다시 비활성
4. Ctrl+A -> 모두 활성
5. 키보드 D 키도 동일 (Inspector 의존 없음)

## 다음 사이클
- v0.1.262 — 40th stable seal 검토 (v0.1.258~261 4 사이클)- v0.1.263 — QA-014 (PM 회신 받으면)- v0.1.264 — QA-067 (리스트 갱신 시 스크롤 초기화) + QA-068 (Gizmo 다중 선택)협업자 git origin/main = local.


---

## 봉인 참조

본 사이클은 **48th stable seal (v0.1.366, 2026-05-24)** 일괄 봉인에 포함됨.

- journal: [2026-05-24-v0.1.298-366-48th-stable-seal.md](../../journal/2026-05-24-v0.1.298-366-48th-stable-seal.md)
- alias zip: [factory00-windows-x64-v0.1.366-stable.zip](../../downloads/factory00-windows-x64-v0.1.366-stable.zip) (170 MB)
