Menus take the keyboard (Up/Down choose a row, Enter runs it); F2 renames the selected body, sketch, feature, plane, component or canvas

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
bherbruckandClaude Opus 5.5 committed 2026-10-08 13:08:43 +00:00
1 parent 0ee343b9e6
commit c009bb2c2a
4 files changed
+63 -4

No files matched your search

+12
View File
@@ -443,3 +443,15 @@ fn an_uncaptured_move_asks_before_the_next_command() {
assert_eq!(app.session.doc.occurrences[0].transform[3][0], 10.0);
assert!(crate::browser::answer_capture(&mut app, "capture").is_err(), "nothing waits now");
}
#[test]
fn f2_renames_the_selected_item() {
let mut app = sample_app();
let b = body(&app);
app.run("select.set", json!({"items": [{"type": "body", "name": b}]})).unwrap();
assert!(context_menu::rename_selection(&mut app, pos2(0.0, 0.0)));
assert!(context_menu::finish_rename(&mut app, Some("Base"), true));
assert!(app.session.model.state().body("Base").is_some());
app.run("select.clear", json!({})).unwrap();
assert!(!context_menu::rename_selection(&mut app, pos2(0.0, 0.0)), "nothing selected");
}