Skip to content

Prompt dialog before overwriting files on export + checkboxes UI fix#417

Open
linkmodo wants to merge 2 commits into
marcinz606:mainfrom
linkmodo:feature/export-overwrite-prompt
Open

Prompt dialog before overwriting files on export + checkboxes UI fix#417
linkmodo wants to merge 2 commits into
marcinz606:mainfrom
linkmodo:feature/export-overwrite-prompt

Conversation

@linkmodo

@linkmodo linkmodo commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Two commits: the export overwrite-protection change, and a small dark-theme checkbox fix it surfaced. make lint / make type / make test all pass.

1. Prompt before overwriting existing files on export

Export (single) and Export All silently overwrote files that already existed at the destination, with no warning. The "Overwrite existing files" option now gates this, and the default is safe:

  • Unchecked (new default): if a batch would clobber existing files, the export is gated on a prompt - Overwrite / Rename / Cancel - listing the conflicting filenames. Rename falls back to the worker's numbered-suffix auto-rename; Cancel aborts the whole export. Same behavior for single Export and Export All (all route through _run_export_tasks).
  • Checked: overwrite silently, no prompt.
  • The prompt carries an "Always overwrite without asking" checkbox that, when ticked with Overwrite, persists the preference (turns the Export-panel option on and the sticky default), so it stays on until turned off.

Behavior change: the overwrite default flips True → False so the warning is on by default. A previously saved "checked" preference keeps overwriting silently as before.

Implementation

  • Factored the worker's output-path logic into shared, testable helpers (resolve_export_dir / resolve_export_naming / resolve_export_target_path / find_export_conflicts) so conflict detection resolves the exact path the worker writes, and refactored run_batch to reuse them.
  • AppController._resolve_export_conflicts runs before dispatch; _set_overwrite_preference persists the remembered choice without touching edit history or re-rendering.
  • Contact-sheet export is unchanged (already auto-renames, no fixed per-frame names to collide).

2. Visible checkboxes on the dark theme

Fusion's default checkbox indicator is nearly invisible against the app's #0D0D0D background — the unchecked "Overwrite existing files" box (and every other checkbox) blended in. Added a QCheckBox::indicator rule: a clear border + subtle fill when unchecked (brighter on hover), and an accent box with a white checkmark when checked. The checkmark is an SVG (media/icons/checkbox_check.svg, already bundled via --add-data=media), with its absolute path injected into the stylesheet at load time since QSS url() can't resolve relative paths reliably across dev and frozen runs.

Tests

  • test_export_overwrite.py: output-path resolution per output-mode + filesystem conflict detection.
  • test_controller.py: silent-preference path (no prompt), overwrite / rename / cancel, remember-persist, and no-conflict pass-through.

(test_export_presets.py::test_output_dir_subfolder_of_source fails on Windows due to a pre-existing os.path.join separator assumption, unrelated to this change — fails on main too.)

linkmodo and others added 2 commits July 7, 2026 20:10
Export (single) and Export All silently overwrote files that already existed at
the destination, with no warning. Now the "Overwrite existing files" option gates
this, and the default is safe:

- Unchecked (new default): if a batch would clobber existing files, the export is
  gated on a prompt — Overwrite / Rename / Cancel — listing the conflicting names.
  Rename falls back to the worker's numbered-suffix auto-rename; Cancel aborts the
  whole export. Same behavior for single Export and Export All (all route through
  _run_export_tasks).
- Checked: overwrite silently, no prompt (for both Export and Export All).
- The prompt carries an "Always overwrite without asking" checkbox that, when
  ticked with Overwrite, persists the preference (turns the Export-panel option on
  and the sticky default), so it stays on until turned off.

The overwrite default flips True -> False so the warning is on by default; a saved
"checked" preference keeps overwriting silently as before.

Implementation:
- Factor the worker's output-path logic into shared, testable helpers
  (resolve_export_dir / resolve_export_naming / resolve_export_target_path /
  find_export_conflicts) so conflict detection resolves the exact path the worker
  writes, and refactor run_batch to reuse them.
- AppController._resolve_export_conflicts runs before dispatch; _set_overwrite_
  preference persists the remembered choice without touching edit history.

Contact-sheet export is unchanged (already auto-renames, no fixed per-frame names).

Tests: path resolution + conflict detection, and controller wiring for the silent
preference, overwrite / rename / cancel, remember-persist, and no-conflict pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fusion's default checkbox indicator is nearly invisible against the app's
#0D0D0D background — the unchecked "Overwrite existing files" box (and every
other checkbox) blended in. Add a QCheckBox::indicator rule: a clear border and
subtle fill when unchecked (brighter on hover), and an accent box with a white
checkmark when checked.

The checkmark is an SVG (media/icons/checkbox_check.svg); its absolute path is
baked into the stylesheet at load time because QSS url() can't resolve relative
paths reliably across dev and frozen runs. media/ is already bundled by build.py.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@linkmodo linkmodo force-pushed the feature/export-overwrite-prompt branch from dd8540f to e2815b2 Compare July 8, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant