From 90f9907de970c3dc8d6c66ddce35941e2e992751 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 30 Oct 2026 06:49:52 -0700 Subject: [PATCH] Brushes: Alt-click Delete Brush runs through the shared command helper --- crates/ui-egui/src/panels/brushes.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/panels/brushes.rs b/crates/ui-egui/src/panels/brushes.rs index 29acddf37..22b7d9401 100644 --- a/crates/ui-egui/src/panels/brushes.rs +++ b/crates/ui-egui/src/panels/brushes.rs @@ -206,14 +206,14 @@ fn run_on(app: &mut VectorcraftApp, id: &str, names: &[String]) { /// Delete `names` after asking, or immediately when the bottom button was Alt-clicked. fn delete(app: &mut VectorcraftApp, names: &[String], now: bool) { + if now { + run_on(app, "brush.delete", names); + return; + } let params = match names { [name] => json!({ "name": name }), _ => json!({ "names": names }), }; - if now { - app.run("brush.delete", params).ok(); - return; - } let message = match names { [name] => crate::i18n::fmt(tl!("Delete the brush “{name}”?"), &[("name", name)]), _ => crate::i18n::fmt(tl!("Delete these {count} brushes?"), &[("count", &names.len().to_string())]),