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:
@@ -325,11 +325,8 @@ class MainWindow(QMainWindow):
|
||||
self.image_canvas.load_print(print_path)
|
||||
self.export_panel.set_garment(garment_path)
|
||||
self.export_panel.set_print(print_path)
|
||||
# If the item already has a fine-tuned transform, restore it
|
||||
if item.transform:
|
||||
self.image_canvas.set_transform(item.transform)
|
||||
self.transform_panel.set_transform(item.transform)
|
||||
# Keep template panel garment and print size in sync
|
||||
# Keep template panel garment and print size in sync first, so
|
||||
# apply_current() below can compute the template layout.
|
||||
try:
|
||||
from PIL import Image as _PilImage
|
||||
with _PilImage.open(garment_path) as img:
|
||||
@@ -338,6 +335,13 @@ class MainWindow(QMainWindow):
|
||||
self.template_panel.set_print_size(img.width, img.height)
|
||||
except Exception:
|
||||
pass
|
||||
# Fine-tuned item: restore its own transform. Otherwise lay the print
|
||||
# out per the selected template instead of load_print's default.
|
||||
if item.transform:
|
||||
self.image_canvas.set_transform(item.transform)
|
||||
self.transform_panel.set_transform(item.transform)
|
||||
else:
|
||||
self.template_panel.apply_current()
|
||||
finally:
|
||||
self._loading_queue_item = False
|
||||
self._update_reset_availability()
|
||||
|
||||
Reference in New Issue
Block a user