Skip to content

Commit 2592efd

Browse files
committed
fix lints
1 parent 35cd3f1 commit 2592efd

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

crates/store/re_types/src/datatypes/text_log_column_ext.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ impl TextLogColumn {
1212
pub fn kind_name(&self) -> &'static str {
1313
match self {
1414
Self::Timeline(_) => "Timeline",
15-
Self::EntityPath => "Entity Path",
15+
Self::EntityPath => "Entity path",
1616
Self::LogLevel => "Level",
1717
Self::Body => "Body",
1818
}

crates/viewer/re_view_text_log/src/view_class.rs

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,14 @@ Filter message types and toggle column visibility in a selection panel.",
7979
system_registry.register_fallback_provider(
8080
TextLogColumns::descriptor_columns().component,
8181
|ctx| {
82-
let mut columns: Vec<_> = ctx
83-
.recording()
84-
.times_per_timeline()
85-
.timelines()
86-
.map(|timeline| {
87-
datatypes::TextLogColumn::Timeline(timeline.name().as_str().into())
88-
})
89-
.collect();
90-
91-
columns.push(datatypes::TextLogColumn::EntityPath);
92-
columns.push(datatypes::TextLogColumn::LogLevel);
93-
columns.push(datatypes::TextLogColumn::Body);
82+
let columns = vec![
83+
datatypes::TextLogColumn::Timeline(
84+
ctx.viewer_ctx().time_ctrl.timeline().name().as_str().into(),
85+
),
86+
datatypes::TextLogColumn::EntityPath,
87+
datatypes::TextLogColumn::LogLevel,
88+
datatypes::TextLogColumn::Body,
89+
];
9490

9591
TextLogColumnList(bp_datatypes::TextLogColumnList { columns })
9692
},
@@ -160,7 +156,6 @@ Filter message types and toggle column visibility in a selection panel.",
160156
) -> Result<(), ViewSystemExecutionError> {
161157
let state = state.downcast_mut::<TextViewState>()?;
162158

163-
// We need a custom UI here because we use arrays, whih component UI doesn't support.
164159
ui.list_item_scope("text_log_selection_ui", |ui| {
165160
let ctx = self.view_context(ctx, view_id, state);
166161
re_view::view_property_ui::<TextLogColumns>(&ctx, ui);
@@ -429,6 +424,7 @@ fn column_name_ui(ctx: &ViewerContext<'_>, ui: &mut egui::Ui, column: &datatypes
429424
}
430425
}
431426

427+
// We need this to be a custom ui to bew able to use the view state to get seen text log levels.
432428
fn view_property_ui_rows(ctx: &ViewContext<'_>, ui: &mut egui::Ui) {
433429
let property = ViewProperty::from_archetype::<TextLogRows>(
434430
ctx.blueprint_db(),

0 commit comments

Comments
 (0)