fix: address PCB access review in CLI and desktop

This commit was merged in pull request #20.
This commit is contained in:
阿白叔 committed 2026-11-23 12:10:30 +08:00
1 parent 2d6acc1180
commit 7c239e123b
11 files changed
+151 -16

No files matched your search

+3 -1
View File
@@ -43,7 +43,9 @@ def _cancel_target(snapshot):
from .post_repair_consent import exact_prompt
from .dialog_rules import pcb_version_choice
if exact_prompt(snapshot):
return 'read_write_access', next(c for c in snapshot.controls if c.control_id == 7)
no = next((c for c in snapshot.controls if c.class_name == 'Button'
and c.control_id == 7 and c.enabled), None)
return ('read_write_access', no) if no is not None else None
text = ' '.join(' '.join(c.name for c in snapshot.controls
if c.class_name == 'Static').split())
buttons = [c for c in snapshot.controls if c.class_name == 'Button']