Respect excluded files in output step counts and processing validation
- Output step now shows only included (non-excluded) image count and size - Navigate-to-step refresh accounts for exclusions - Process action checks for included images, not just loaded files
This commit is contained in:
@@ -569,18 +569,21 @@ fn navigate_to_step(ui: &WizardUi, target: usize) {
|
||||
if target == 9 {
|
||||
// Output step - update image count, total size, and operation summary
|
||||
let files = ui.state.loaded_files.borrow();
|
||||
let count = files.len();
|
||||
let excluded = ui.state.excluded_files.borrow();
|
||||
let included_count = files.iter().filter(|p| !excluded.contains(*p)).count();
|
||||
let total_size: u64 = files.iter()
|
||||
.filter(|p| !excluded.contains(*p))
|
||||
.filter_map(|p| std::fs::metadata(p).ok())
|
||||
.map(|m| m.len())
|
||||
.sum();
|
||||
drop(excluded);
|
||||
drop(files);
|
||||
if let Some(page) = ui.pages.get(9) {
|
||||
walk_widgets(&page.child(), &|widget| {
|
||||
if let Some(row) = widget.downcast_ref::<adw::ActionRow>()
|
||||
&& row.title().as_str() == "Images to process"
|
||||
{
|
||||
row.set_subtitle(&format!("{} images ({})", count, format_bytes(total_size)));
|
||||
row.set_subtitle(&format!("{} images ({})", included_count, format_bytes(total_size)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user