feat: print name in output filename; export panel trim; queue template fix

- Output filename now includes the print: <garment>_<print>.<ext>, e.g.
  1_TY030.png (folder grouping unchanged) (§17.12).
- Hide the single-export button (export via the queue) and remove the
  orphaned static export hint label (§17.13).
- Fix: selecting a non-fine-tuned queue item now lays the print out per the
  selected template (apply_current) instead of load_print's centred default;
  still guarded by _loading_queue_item so it isn't marked 已微调 (§17.14).

Docs: PRD 6.6/6.8/9, UI design 7.6/7.7/10/12.4, tasks.md 17.12–17.14.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-17 15:51:52 +08:00
co-authored by Claude Opus 4.8
parent 97341a5831
commit 7a1b9d8330
6 changed files with 80 additions and 44 deletions
+56
View File
@@ -764,6 +764,62 @@
- [x] 选 JPG 后批量导出的文件为 `.jpg` 且按 JPEG 保存
- [x] 批量导出跟随所选输出目录与质量
### 17.12 合并图文件名加上印花名
前置阅读:
- `docs/02-prd.md`(6.8 单张合成导出、9 数据与文件结构)
任务:
- [x] `make_safe_output_path` 的文件名由 `<衣服文件名>` 改为 `<衣服文件名>_<印花文件名>`
- [x] 目录分组结构不变(仍 `输出目录/<时间戳>/<印花文件名>/`)
- [x] 重名仍追加 `_1`/`_2` 避免覆盖
验收:
- [x] 输出文件形如 `输出目录/<时间戳>/TY030/1_TY030.png`
- [x] 单张导出与批量导出一致
### 17.13 隐藏「导出当前单张」按钮
前置阅读:
- `docs/07-ui-design.md`(7.7 操作按钮、10 视觉规范)
任务:
- [x] 隐藏导出面板的 `导出当前单张` 按钮(`setVisible(False)`)
- [x] 保留按钮与 `_do_export` 逻辑,便于后续需要时再显示
- [x] 导出统一经底部合成队列完成
验收:
- [x] 导出面板不再显示 `导出当前单张`,只剩输出设置
- [x] 队列的批量/选中导出不受影响
### 17.14 修复:选中未微调队列项时预览未按模板落位
前置阅读:
- `docs/02-prd.md`(6.6 模板选择)
- `docs/07-ui-design.md`(12.4 选中队列项)
问题:
- `_on_queue_item_activated` 仅在 `item.transform` 存在(已微调)时覆盖画布变换;未微调项保留 `load_print` 的写死默认(印花≈衣服宽 40%、居中),预览尺寸与选中模板不一致——「模板粘性」在队列项激活路径的遗漏分支。
任务:
- [x] 选中队列项且 `item.transform` 为空时,调用 `template_panel.apply_current()` 按当前模板落位
- [x] 仍在 `_loading_queue_item` 保护下,避免被误标为「已微调」
- [x] 与预览流程(`_on_print_preview`)行为一致
验收:
- [x] 点击未微调队列项,预览印花为选中模板要求的大小/位置
- [x] 已微调项仍显示其自身参数,不被覆盖
## 18. 后续暂缓任务
以下任务第一阶段暂不做,后续需要时再新增设计文档: