Skip to content

Commit

Permalink
suppress eye movements upon modifier key pressed; clear equi context …
Browse files Browse the repository at this point in the history
…key inputs before UICommand
  • Loading branch information
kailiuca committed Feb 9, 2025
1 parent a9fbe2e commit e1533e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/viewer/re_view_spatial/src/eye.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,12 @@ impl ViewEye {
return false; // e.g. we're typing in a TextField
}

// Navigation should not be activated if any modifiers is pressed
let modifiers_pressed = egui_ctx.input(|input| input.modifiers.any());
if modifiers_pressed {
return false;
}

let mut did_interact = false;
let mut requires_repaint = false;

Expand Down
6 changes: 6 additions & 0 deletions crates/viewer/re_viewer/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,12 @@ impl App {
Some(re_log_types::StoreId::random(StoreKind::Recording))
});

// Clear any shortcut input before firing up any UI components
egui_ctx.input_mut(|input| {
input.modifiers = Default::default();
input.keys_down = Default::default();
});

match cmd {
UICommand::SaveRecording => {
if let Err(err) = save_recording(self, store_context, None) {
Expand Down

0 comments on commit e1533e8

Please sign in to comment.