From 3a9e6926ff7c1a35264afcffbc1c3bbea8a76668 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 29 Sep 2024 17:05:48 +0200 Subject: [PATCH] Cleanup --- crates/store/re_chunk/src/chunk.rs | 1 + crates/viewer/re_ui/src/command.rs | 2 +- crates/viewer/re_viewer/src/app_state.rs | 1 - crates/viewer/re_viewer/src/ui/rerun_menu.rs | 4 ++-- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/store/re_chunk/src/chunk.rs b/crates/store/re_chunk/src/chunk.rs index 5630d014ed3d..d0d63b80e50c 100644 --- a/crates/store/re_chunk/src/chunk.rs +++ b/crates/store/re_chunk/src/chunk.rs @@ -118,6 +118,7 @@ impl PartialEq for Chunk { impl Chunk { /// Returns a version of us with a new id #[must_use] + #[inline] pub fn with_id(mut self, id: ChunkId) -> Self { self.id = id; self diff --git a/crates/viewer/re_ui/src/command.rs b/crates/viewer/re_ui/src/command.rs index b195400de6c9..a1ad80bf18f4 100644 --- a/crates/viewer/re_ui/src/command.rs +++ b/crates/viewer/re_ui/src/command.rs @@ -298,7 +298,7 @@ impl UICommand { Self::CloseAllRecordings => None, Self::Undo => Some(cmd(Key::Z)), - Self::Redo => Some(cmd_shift(Key::Z)), // TODO: cmd-y? + Self::Redo => Some(cmd_shift(Key::Z)), #[cfg(all(not(target_arch = "wasm32"), target_os = "windows"))] Self::Quit => Some(KeyboardShortcut::new(Modifiers::ALT, Key::F4)), diff --git a/crates/viewer/re_viewer/src/app_state.rs b/crates/viewer/re_viewer/src/app_state.rs index 63c8c9fa3912..799307ebab18 100644 --- a/crates/viewer/re_viewer/src/app_state.rs +++ b/crates/viewer/re_viewer/src/app_state.rs @@ -504,7 +504,6 @@ impl AppState { /// If `inspect_blueprint_timeline` is enabled, we use the time selection from the /// blueprint `time_ctrl`. Otherwise, we use a latest query from the blueprint timeline. pub fn blueprint_query_for_viewer(&mut self, blueprint: &EntityDb) -> LatestAtQuery { - // TODO: sync self.blueprint_cfg.time_ctrl and blueprint_undo_state if self.app_options.inspect_blueprint_timeline { self.blueprint_cfg.time_ctrl.read().current_query().clone() } else { diff --git a/crates/viewer/re_viewer/src/ui/rerun_menu.rs b/crates/viewer/re_viewer/src/ui/rerun_menu.rs index 91ab4c01d340..4cdb13bc76d2 100644 --- a/crates/viewer/re_viewer/src/ui/rerun_menu.rs +++ b/crates/viewer/re_viewer/src/ui/rerun_menu.rs @@ -32,8 +32,8 @@ impl App { ui.add_space(SPACING); - UICommand::Undo.menu_button_ui(ui, &self.command_sender); // TODO: only enabled if there is something to undo/redo - UICommand::Redo.menu_button_ui(ui, &self.command_sender); // TODO: only enabled if there is something to undo/redo + UICommand::Undo.menu_button_ui(ui, &self.command_sender); // TODO(emilk): only enabled if there is something to undo + UICommand::Redo.menu_button_ui(ui, &self.command_sender); // TODO(emilk): only enabled if there is something to redo UICommand::ToggleCommandPalette.menu_button_ui(ui, &self.command_sender);