Skip to content

Commit

Permalink
Add exclusion expressions to the query editor
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs committed Nov 29, 2023
1 parent f985f36 commit b815a02
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions crates/re_viewer/src/ui/selection_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,17 +418,22 @@ fn blueprint_ui(
if let Some(space_view) = viewport.blueprint.space_view(space_view_id) {
if space_view.queries.len() == 1 {
let query = space_view.queries.first().unwrap();
let expressions = query.expressions.inclusions.join("\n");
let mut edited_expressions = expressions.clone();
let inclusions = query.expressions.inclusions.join("\n");
let mut edited_inclusions = inclusions.clone();
let exclusions = query.expressions.exclusions.join("\n");
let mut edited_exclusions = exclusions.clone();

ui.text_edit_multiline(&mut edited_expressions);
ui.label("Inclusion expressions");
ui.text_edit_multiline(&mut edited_inclusions);
ui.label("Exclusion expressions");
ui.text_edit_multiline(&mut edited_exclusions);

if edited_expressions != expressions {
if edited_inclusions != inclusions || edited_exclusions != exclusions {
let timepoint = TimePoint::timeless();

let expressions_component = QueryExpressions {
inclusions: edited_expressions.split('\n').map(|s| s.into()).collect(),
exclusions: vec![],
inclusions: edited_inclusions.split('\n').map(|s| s.into()).collect(),
exclusions: edited_exclusions.split('\n').map(|s| s.into()).collect(),
};

let row = DataRow::from_cells1_sized(
Expand Down

0 comments on commit b815a02

Please sign in to comment.