fix: Apply Settings roll count respects the filename filter (#450)#451
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 touchesAppState.uploaded_files. Every "whole roll" operation read the fulluploaded_files, so filtered-out files (the.jpgsiblings) 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:ty+ ruff clean, full suite: 1551 passed, 4 skipped.