Second default keys, also in menu lines

F2 Deselect All, Cmd+Shift+T Effect Controls, Cmd+Alt+Left / Right Go to Start /
End, Cmd+Shift+/ Add to Render Queue.

Effect Controls is a menu entry with bound parameters, which could hold one key:
a menu line can now give further default keys after a comma
(F3, Cmd+Shift+T); the menus show the first. MenuEntry gains alt_shortcuts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pravdomil
2026-10-12 17:37:18 +02:00
co-authored by Claude Opus 5.5
parent 6f5bd0c272
commit eec84a8095
8 changed files with 90 additions and 34 deletions
+7 -1
View File
@@ -661,7 +661,13 @@ fn dynamic_menus_and_window_viewer_labels() {
assert_eq!(crate::menus::dynamic(&s, "history", &Default::default()).0.len(), s.history.undo.len());
let a = solid(&mut s, "#ff0000");
s.state.selected_layers = vec![LayerId(a)];
let entry = |cmd: &str, panel: &str| crate::menus::MenuEntry { label: "x".into(), command: cmd.into(), params: json!({"panel": panel}), shortcut: None };
let entry = |cmd: &str, panel: &str| crate::menus::MenuEntry {
label: "x".into(),
command: cmd.into(),
params: json!({"panel": panel}),
shortcut: None,
alt_shortcuts: vec![],
};
assert_eq!(crate::menus::entry_label(&s, &entry("window.panel", "composition")), "Composition: Main");
assert_eq!(crate::menus::entry_label(&s, &entry("window.panel", "timeline")), "Timeline: Main");
assert!(crate::menus::entry_label(&s, &entry("window.panel", "layer")).starts_with("Layer: "));