Skip to content

Commit

Permalink
Cleanup menu / config options
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs committed Jan 16, 2024
1 parent 3c91af7 commit d34d59e
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 22 deletions.
9 changes: 3 additions & 6 deletions crates/re_time_panel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -778,15 +778,12 @@ impl TimePanel {

if cfg!(debug_assertions)
&& ui
.selectable_label(
ctx.app_options.show_blueprint_in_timeline,
"View Blueprint",
)
.selectable_label(ctx.app_options.show_blueprint_timeline, "View Blueprint")
.clicked()
{
ctx.command_sender
.send_system(SystemCommand::ShowBlueprintInTimeline(
!ctx.app_options.show_blueprint_in_timeline,
.send_system(SystemCommand::ShowBlueprintTimeline(
!ctx.app_options.show_blueprint_timeline,
));
}
});
Expand Down
6 changes: 3 additions & 3 deletions crates/re_viewer/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ impl App {
store_hub.clear_blueprint();
}
SystemCommand::UpdateBlueprint(blueprint_id, updates) => {
if !self.state.app_options.show_blueprint_in_timeline {
if !self.state.app_options.show_blueprint_timeline {
let blueprint_db = store_hub.entity_db_mut(&blueprint_id);
for row in updates {
match blueprint_db.add_data_row(row) {
Expand All @@ -386,8 +386,8 @@ impl App {
}
}
}
SystemCommand::ShowBlueprintInTimeline(show) => {
self.app_options_mut().show_blueprint_in_timeline = show;
SystemCommand::ShowBlueprintTimeline(show) => {
self.app_options_mut().show_blueprint_timeline = show;
}
SystemCommand::EnableExperimentalDataframeSpaceView(enabled) => {
let result = if enabled {
Expand Down
4 changes: 2 additions & 2 deletions crates/re_viewer/src/app_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ impl AppState {
focused_item,
};

if app_options.show_blueprint_in_timeline {
if app_options.show_blueprint_timeline {
blueprint_panel.show_panel(
&ctx,
ctx.store_context.blueprint,
Expand Down Expand Up @@ -395,7 +395,7 @@ impl AppState {
}

pub fn blueprint_query(&self) -> LatestAtQuery {
if self.app_options.show_blueprint_in_timeline {
if self.app_options.show_blueprint_timeline {
self.blueprint_cfg.time_ctrl.read().current_query().clone()
} else {
LatestAtQuery::latest(blueprint_timeline())
Expand Down
10 changes: 5 additions & 5 deletions crates/re_viewer/src/ui/rerun_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,16 +316,16 @@ fn experimental_feature_ui(
.on_hover_text("The legacy container blueprint storage is deprecated, but may be helpful if unexpected regressions are found in the new container blueprints.");

re_ui.checkbox(ui,
&mut app_options.show_blueprint_in_timeline,
"Show Blueprint in the Time Panel",
&mut app_options.show_blueprint_timeline,
"Show a timeline of the Blueprint data.",
)
.on_hover_text("Show the Blueprint data in the Time Panel tree view. This is useful for debugging the internal blueprint state.");

re_ui.checkbox(ui,
&mut app_options.disable_blueprint_gc,
"Disable the blueprint GC",
"Disable the blueprint garbage collector.",
)
.on_hover_text("Don't GC the blueprint data. This is useful for debugging the internal blueprint state.");
.on_hover_text("Don't garbage collect the blueprint data. This is useful for debugging the internal blueprint state.");
}

#[cfg(debug_assertions)]
Expand Down Expand Up @@ -397,7 +397,7 @@ fn debug_menu_options_ui(
).on_hover_text("Show a debug overlay that renders the picking layer information using the `debug_overlay.wgsl` shader.");

re_ui.checkbox(ui,
&mut app_options.show_blueprint_in_timeline,
&mut app_options.show_blueprint_timeline,
"Show Blueprint in the Time Panel",
).on_hover_text("Show the Blueprint data in the Time Panel tree view. This is useful for debugging the internal blueprint state.");

Expand Down
2 changes: 1 addition & 1 deletion crates/re_viewer/src/ui/selection_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use re_data_ui::{image_meaning_for_entity, item_ui, DataUi};
use re_entity_db::{
ColorMapper, Colormap, EditableAutoValue, EntityPath, EntityProperties, VisibleHistory,
};
use re_log_types::{DataRow, EntityPathFilter, RowId, TimePoint};
use re_log_types::{DataRow, EntityPathFilter, RowId};
use re_space_view_time_series::TimeSeriesSpaceView;
use re_types::{
components::{PinholeProjection, Transform3D},
Expand Down
6 changes: 3 additions & 3 deletions crates/re_viewer_context/src/app_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ pub struct AppOptions {
pub show_picking_debug_overlay: bool,

/// Includes the blueprint in the timeline view.
pub show_blueprint_in_timeline: bool,
pub show_blueprint_timeline: bool,

/// Includes the blueprint in the timeline view.
/// Disable garbage collection of the blueprint.
pub disable_blueprint_gc: bool,

/// What time zone to display timestamps in.
Expand Down Expand Up @@ -72,7 +72,7 @@ impl Default for AppOptions {

show_picking_debug_overlay: false,

show_blueprint_in_timeline: false,
show_blueprint_timeline: false,

disable_blueprint_gc: false,

Expand Down
2 changes: 1 addition & 1 deletion crates/re_viewer_context/src/command_sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub enum SystemCommand {
UpdateBlueprint(StoreId, Vec<DataRow>),

/// Show blueprint in timeline
ShowBlueprintInTimeline(bool),
ShowBlueprintTimeline(bool),

/// Enable or disable the experimental dataframe space views.
EnableExperimentalDataframeSpaceView(bool),
Expand Down
2 changes: 1 addition & 1 deletion crates/re_viewer_context/src/viewer_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl<'a> ViewerContext<'a> {
&self,
entity_path: &EntityPath,
) -> re_data_store::LatestAtQuery {
if self.app_options.show_blueprint_in_timeline
if self.app_options.show_blueprint_timeline
&& self.store_context.blueprint.is_logged_entity(entity_path)
{
self.blueprint_cfg.time_ctrl.read().current_query()
Expand Down

0 comments on commit d34d59e

Please sign in to comment.