Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove selection history #8296

Merged
merged 5 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crates/viewer/re_selection_panel/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! The UI for the selection panel.

mod defaults_ui;
mod selection_history_ui;
mod selection_panel;
mod space_view_entity_picker;
mod space_view_space_origin_ui;
Expand Down
216 changes: 0 additions & 216 deletions crates/viewer/re_selection_panel/src/selection_history_ui.rs

This file was deleted.

13 changes: 1 addition & 12 deletions crates/viewer/re_selection_panel/src/selection_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use re_viewport_blueprint::{ui::show_add_space_view_or_container_modal, Viewport
use crate::space_view_entity_picker::SpaceViewEntityPicker;
use crate::{defaults_ui::view_components_defaults_section_ui, visualizer_ui::visualizer_ui};
use crate::{
selection_history_ui::SelectionHistoryUi,
visible_time_range_ui::visible_time_range_ui_for_data_result,
visible_time_range_ui::visible_time_range_ui_for_view,
};
Expand All @@ -39,8 +38,6 @@ fn default_selection_panel_width(screen_width: f32) -> f32 {
#[derive(Default, serde::Deserialize, serde::Serialize)]
#[serde(default)]
pub struct SelectionPanel {
selection_state_ui: SelectionHistoryUi,

#[serde(skip)]
/// State for the "Add entity" modal.
space_view_entity_modal: SpaceViewEntityPicker,
Expand Down Expand Up @@ -74,15 +71,7 @@ impl SelectionPanel {
ui.panel_content(|ui| {
let hover = "The selection view contains information and options about \
the currently selected object(s)";
ui.panel_title_bar_with_buttons("Selection", Some(hover), |ui| {
let mut history = ctx.selection_state().history.lock();
if let Some(selection) =
self.selection_state_ui
.selection_ui(ui, viewport, &mut history)
{
ctx.selection_state().set_selection(selection);
}
});
ui.panel_title_bar("Selection", Some(hover));
});

// move the vertical spacing between the title and the content to _inside_ the scroll
Expand Down
7 changes: 0 additions & 7 deletions crates/viewer/re_ui/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ pub enum UICommand {
#[cfg(not(target_arch = "wasm32"))]
ZoomReset,

SelectionPrevious,
SelectionNext,

ToggleCommandPalette,

// Playback:
Expand Down Expand Up @@ -199,8 +196,6 @@ impl UICommand {
"Resets the UI zoom level to the operating system's default value",
),

Self::SelectionPrevious => ("Previous selection", "Go to previous selection"),
Self::SelectionNext => ("Next selection", "Go to next selection"),
Self::ToggleCommandPalette => ("Command palette…", "Toggle the Command Palette"),

Self::PlaybackTogglePlayPause => {
Expand Down Expand Up @@ -346,8 +341,6 @@ impl UICommand {
#[cfg(not(target_arch = "wasm32"))]
Self::ZoomReset => Some(egui::gui_zoom::kb_shortcuts::ZOOM_RESET),

Self::SelectionPrevious => Some(ctrl_shift(Key::ArrowLeft)),
Self::SelectionNext => Some(ctrl_shift(Key::ArrowRight)),
Self::ToggleCommandPalette => Some(cmd(Key::P)),

Self::PlaybackTogglePlayPause => Some(key(Key::Space)),
Expand Down
6 changes: 0 additions & 6 deletions crates/viewer/re_viewer/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -825,12 +825,6 @@ impl App {
egui_ctx.set_zoom_factor(1.0);
}

UICommand::SelectionPrevious => {
self.state.selection_state.select_previous();
}
UICommand::SelectionNext => {
self.state.selection_state.select_next();
}
UICommand::ToggleCommandPalette => {
self.cmd_palette.toggle();
}
Expand Down
2 changes: 0 additions & 2 deletions crates/viewer/re_viewer_context/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod item;
mod maybe_mut_ref;
mod query_context;
mod query_range;
mod selection_history;
mod selection_state;
mod space_view;
mod store_context;
Expand Down Expand Up @@ -59,7 +58,6 @@ pub use self::{
DataQueryResult, DataResultHandle, DataResultNode, DataResultTree, QueryContext,
},
query_range::QueryRange,
selection_history::SelectionHistory,
selection_state::{
ApplicationSelectionState, HoverHighlight, InteractionHighlight, ItemCollection,
ItemSpaceContext, SelectionHighlight,
Expand Down
Loading
Loading