Integration: Alt+arrow leaves a selected field in place for Calculation order (#2621 × #3733)

Prepare a form's arrow-key nudge (#2621) consumed Alt+↑/↓ as plain arrows,
because egui's consume_key ignores an extra Alt. Calculation order (#3733)
moves the selected field with Alt+↑/↓, so the field moved a point on the
page instead of in the order. The nudge now leaves Alt+arrow alone.
This commit is contained in:
aiongg
2026-10-22 04:09:12 +00:00
parent 0943c7d00a
commit 50ae733d66
+2 -1
View File
@@ -569,7 +569,8 @@ pub(crate) fn delete_selected(view: &mut DocView) -> Option<Edit> {
/// as the object nudge does (`object_ui::nudge_keys`) and as dragging it does (#2608). The keys
/// are consumed before the view turns the page with them; one press is one undo step.
pub(crate) fn nudge_keys(ctx: &egui::Context, view: &mut DocView, doc: &Document) {
if ctx.egui_wants_keyboard_input() || view.prepare.grab.is_some() {
// `consume_key` lets an extra Alt through, and Alt+↑/↓ belongs to Calculation order's move.
if ctx.egui_wants_keyboard_input() || view.prepare.grab.is_some() || ctx.input(|i| i.modifiers.alt) {
return;
}
let Some((name, wi)) = view.prepare.selected.clone() else { return };