From cf9087bb87975eb7e3559a586a6f32029d3b1e3e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 28 Oct 2026 10:37:06 -0700 Subject: [PATCH] Keyboard Shortcuts: Go to Conflict is not offered for a row that leaves the list When a recorded chord takes the shortcut from a command that needs a value, that command leaves the list. The dialog now clears its Go to Conflict target as well as its recording and selection. --- crates/ui-egui/src/shortcut_editor.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/shortcut_editor.rs b/crates/ui-egui/src/shortcut_editor.rs index 3fcd691b2..ab3b31f13 100644 --- a/crates/ui-egui/src/shortcut_editor.rs +++ b/crates/ui-egui/src/shortcut_editor.rs @@ -979,10 +979,10 @@ fn export_from_dialog(app: &mut VectorcraftApp) { } /// A row that left the list (Clear, Use Default, Reset to Defaults or another set took the -/// shortcut from a command that needs a value) is no longer recorded or selected, so the next key -/// press does not give the hidden command a shortcut. +/// shortcut from a command that needs a value) is no longer recorded, selected or offered by Go to +/// Conflict, so the next key press does not give the hidden command a shortcut. fn drop_hidden(d: &mut Dialog, overrides: &Overrides) { - for field in ["__recording", "__selected"] { + for field in ["__recording", "__selected", "__conflict"] { let key = d.str(field); if !key.is_empty() && entry(&key).is_none_or(|e| !listed(overrides, e)) { d.fields.insert(field.into(), json!("")); @@ -1085,6 +1085,17 @@ mod tests { set(&mut d, "tool:groupSelection"); drop_hidden(&mut d, km.overrides()); assert_eq!(state(&d), ("tool:groupSelection".to_string(), "tool:groupSelection".to_string())); + // A chord taken from a row that then leaves the list offers no Go to Conflict for it. + let mut km = start.clone(); + record(&mut d, &mut km, "edit.duplicate", "Cmd+Alt+Shift+F12"); + assert_eq!(d.str("__conflict"), "document.setUnits"); + drop_hidden(&mut d, km.overrides()); + assert_eq!(d.str("__conflict"), ""); + // A conflict with a row that stays listed is kept. + let mut km = start.clone(); + record(&mut d, &mut km, "document.setUnits", "Cmd+Alt+Shift+F11"); + drop_hidden(&mut d, km.overrides()); + assert_eq!(d.str("__conflict"), "edit.duplicate"); } #[test]