调整调试图像开关语义

This commit is contained in:
Your Name committed 2026-06-03 01:48:02 +08:00
1 parent 098083a354
commit 168ab4e1f8
9 files changed
+41 -5

No files matched your search

+6
View File
@@ -148,6 +148,9 @@ def load_config_to_ui(
vars_["fudai_detail_ui_mode_var"].set(
str(cfg.get("fudai_detail_ui_mode", "auto") or "auto")
)
vars_["fudai_detail_save_debug_images_var"].set(
bool(cfg.get("fudai_detail_save_debug_images", False))
)
for key, default in {
"fudai_detail_ocr_content_enabled": True,
"fudai_detail_ocr_value_enabled": True,
@@ -437,6 +440,9 @@ def save_ui_to_config(
)
ui_mode = str(vars_["fudai_detail_ui_mode_var"].get() or "auto").strip().lower()
cfg2["fudai_detail_ui_mode"] = ui_mode if ui_mode in ("auto", "legacy", "v2_0") else "auto"
cfg2["fudai_detail_save_debug_images"] = bool(
vars_["fudai_detail_save_debug_images_var"].get()
)
for key in (
"fudai_detail_ocr_content_enabled",
"fudai_detail_ocr_value_enabled",
+4
View File
@@ -130,6 +130,9 @@ def build_config_vars(cfg: dict) -> Dict[str, tk.Variable]:
fudai_detail_ui_mode_var = tk.StringVar(
value=str(cfg.get("fudai_detail_ui_mode", "auto") or "auto")
)
fudai_detail_save_debug_images_var = tk.BooleanVar(
value=bool(cfg.get("fudai_detail_save_debug_images", False))
)
fudai_detail_ocr_content_enabled_var = tk.BooleanVar(
value=bool(cfg.get("fudai_detail_ocr_content_enabled", True))
)
@@ -493,6 +496,7 @@ def build_config_vars(cfg: dict) -> Dict[str, tk.Variable]:
"fudai_disable_content_recognition_var": fudai_disable_content_recognition_var,
"fudai_disable_task_recognition_var": fudai_disable_task_recognition_var,
"fudai_detail_ui_mode_var": fudai_detail_ui_mode_var,
"fudai_detail_save_debug_images_var": fudai_detail_save_debug_images_var,
"fudai_detail_ocr_content_enabled_var": fudai_detail_ocr_content_enabled_var,
"fudai_detail_ocr_value_enabled_var": fudai_detail_ocr_value_enabled_var,
"fudai_detail_ocr_countdown_enabled_var": fudai_detail_ocr_countdown_enabled_var,
+13 -1
View File
@@ -58,7 +58,7 @@ def setup_debug_tab(parent: ttk.Notebook, *, vars_: Dict[str, tk.Variable]) -> t
debug_r0.pack(fill=X, padx=10, pady=(10, 8))
ttk.Checkbutton(
debug_r0,
text="保存调试图像(OCR / 像素 / 模板等)",
text="全局调试图像(OCR / 像素 / 模板等)",
variable=vars_["debug_captures_enabled_var"],
).pack(side=LEFT)
ttk.Checkbutton(
@@ -237,6 +237,18 @@ def setup_debug_tab(parent: ttk.Notebook, *, vars_: Dict[str, tk.Variable]) -> t
side=LEFT, padx=(6, 0)
)
row4debug = ttk.Frame(fudai_find_box)
row4debug.pack(fill=X, padx=10, pady=(0, 8))
ttk.Checkbutton(
row4debug,
text="保存福袋详情综合标注图(仅一张,不保存逐字段裁剪图)",
variable=vars_["fudai_detail_save_debug_images_var"],
).pack(side=LEFT)
ttk.Label(
row4debug,
text="(不受全局调试图像开关影响,用于核对2.0坐标)",
).pack(side=LEFT, padx=(6, 0))
row4ocr1 = ttk.Frame(fudai_find_box)
row4ocr1.pack(fill=X, padx=10, pady=(0, 8))
for label, var_name in (