From e9a6864c968673e2354bd997138225db11465fb3 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 17:19:49 -0800 Subject: [PATCH] Recolor Artwork: Save Prominent Colors leaves out removed colors A color removed on the Edit tab no longer joins the group that Save Prominent Colors makes, as Save All Colors already does. The menu item is turned off when every prominent color was removed. --- crates/ui-egui/src/dialogs/recolor.rs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/crates/ui-egui/src/dialogs/recolor.rs b/crates/ui-egui/src/dialogs/recolor.rs index 05dfb6f3b2..24eb035e81 100644 --- a/crates/ui-egui/src/dialogs/recolor.rs +++ b/crates/ui-egui/src/dialogs/recolor.rs @@ -412,12 +412,13 @@ fn group_colors<'a>(app: &VectorcraftApp, d: &Dialog, rs: impl Iterator = match which { - "prominent" => prominent_parts(d, &rs).into_iter().map(|p| p.0).collect(), + "prominent" => prominent_parts(d, &rs).into_iter().map(|p| p.0).filter(|&i| to_color(&rs[i]).is_some()).collect(), _ => (0..rs.len()).filter(|&i| !excluded(&rs[i]) && to_color(&rs[i]).is_some()).collect(), }; let colors = group_colors(app, d, order.iter().filter_map(|&i| rs.get(i))); @@ -1756,7 +1757,7 @@ fn edit_tab(app: &VectorcraftApp, ui: &mut Ui, d: &mut Dialog, rows: &mut Vec