Skip to content

fix: Apply Settings roll count respects the filename filter (#450)#451

Merged
marcinz606 merged 4 commits into
mainfrom
fix/450-apply-roll-count-filter-aware
Jul 11, 2026
Merged

fix: Apply Settings roll count respects the filename filter (#450)#451
marcinz606 merged 4 commits into
mainfrom
fix/450-apply-roll-count-filter-aware

Conversation

@marcinz606

Copy link
Copy Markdown
Owner

Fixes #450.

Problem

The Apply Settings dialog reported 53 frames for a roll the user sees as 9. The filename filter box is a view-only filter — it narrows what the list shows (AssetListModel._sorted_indices) but never touches AppState.uploaded_files. Every "whole roll" operation read the full uploaded_files, so filtered-out files (the .jpg siblings) were still counted and would be written to on apply-to-roll.

Fix

Scope the two "whole roll" call sites to the visible (filtered) frames via the existing AssetListModel.visible_actual_indices():

  • files.py:_open_apply_dialog — dialog count uses the visible set (53 → 9). No filter → count unchanged.
  • session.py:sync_selected_settings — apply-to-roll iterates visible frames only, so the count matches what actually gets written.

Selection scope is untouched (already pruned to visible). The filter stays a non-destructive view; the dual-mode clear button is unchanged.

Tests

tests/test_desktop_session.py:

  • roll scope with an active filter applies only to visible frames
  • no filter → still covers the whole loaded set

ty + ruff clean, full suite: 1551 passed, 4 skipped.

The filename filter is a view over uploaded_files, but "Whole roll"
operations read the full list — so the Apply dialog counted (and
apply-to-roll wrote to) every loaded file, not just the visible frames.
Scope both to the filtered set via AssetListModel.visible_actual_indices.
@marcinz606 marcinz606 merged commit cac6396 into main Jul 11, 2026
1 check passed
@marcinz606 marcinz606 deleted the fix/450-apply-roll-count-filter-aware branch July 11, 2026 17:07
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.

Count of photos in Apply dialog box incorrect, but possible larger issue with Clear All

1 participant