Skip to content

Commit

Permalink
Remove the feature flag for plot query clamping
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 committed Oct 9, 2024
1 parent f865da2 commit 4eccb94
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,8 @@ impl SeriesLineSystem {
.view_state
.downcast_ref::<TimeSeriesSpaceViewState>()
.map_or(0, |state| state.time_offset);
let time_range = determine_time_range(
view_query.latest_at,
time_offset,
data_result,
plot_mem,
ctx.viewer_ctx.app_options.plot_query_clamping,
);
let time_range =
determine_time_range(view_query.latest_at, time_offset, data_result, plot_mem);
{
use re_space_view::RangeResultsExt as _;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,8 @@ impl SeriesPointSystem {
.view_state
.downcast_ref::<TimeSeriesSpaceViewState>()
.map_or(0, |state| state.time_offset);
let time_range = determine_time_range(
view_query.latest_at,
time_offset,
data_result,
plot_mem,
ctx.viewer_ctx.app_options.plot_query_clamping,
);
let time_range =
determine_time_range(view_query.latest_at, time_offset, data_result, plot_mem);

{
use re_space_view::RangeResultsExt as _;
Expand Down
3 changes: 1 addition & 2 deletions crates/viewer/re_space_view_time_series/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ pub fn determine_time_range(
time_offset: i64,
data_result: &re_viewer_context::DataResult,
plot_mem: Option<&egui_plot::PlotMemory>,
enable_query_clamping: bool,
) -> ResolvedTimeRange {
let query_range = data_result.query_range();

Expand Down Expand Up @@ -68,7 +67,7 @@ pub fn determine_time_range(

// If we're not in auto mode, which is the mode where the query drives the bounds of the plot,
// then we want the bounds of the plots to drive the query!
if !is_auto_bounds && enable_query_clamping {
if !is_auto_bounds {
if let Some((x_min, x_max)) = plot_bounds {
time_range.set_min(i64::max(time_range.min().as_i64(), x_min));
time_range.set_max(i64::min(time_range.max().as_i64(), x_max));
Expand Down
6 changes: 0 additions & 6 deletions crates/viewer/re_viewer/src/ui/rerun_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,12 +380,6 @@ fn experimental_feature_ui(ui: &mut egui::Ui, app_options: &mut re_viewer_contex
ui
.re_checkbox(&mut app_options.experimental_space_view_screenshots, "Space view screenshots")
.on_hover_text("Allow taking screenshots of 2D and 3D space views via their context menu. Does not contain labels.");

ui.re_checkbox(
&mut app_options.plot_query_clamping,
"Plots: query clamping",
)
.on_hover_text("Toggle query clamping for the plot visualizers. This is enabled by default and is only made toggable to facilitate potential bug hunts and performance comparisons.");
}

#[cfg(debug_assertions)]
Expand Down
5 changes: 0 additions & 5 deletions crates/viewer/re_viewer_context/src/app_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ pub struct AppOptions {
#[cfg(not(target_arch = "wasm32"))]
pub experimental_space_view_screenshots: bool,

/// Toggle query clamping for the plot visualizers.
pub plot_query_clamping: bool,

/// Displays an overlay for debugging picking.
pub show_picking_debug_overlay: bool,

Expand Down Expand Up @@ -50,8 +47,6 @@ impl Default for AppOptions {
#[cfg(not(target_arch = "wasm32"))]
experimental_space_view_screenshots: false,

plot_query_clamping: true,

show_picking_debug_overlay: false,

inspect_blueprint_timeline: false,
Expand Down

0 comments on commit 4eccb94

Please sign in to comment.