Skip to content

Commit ef5149b

Browse files
committed
do remaining todos
1 parent ad9bb43 commit ef5149b

File tree

4 files changed

+11
-22
lines changed

4 files changed

+11
-22
lines changed

crates/viewer/re_global_context/src/command_sender.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,8 @@ pub enum SystemCommand {
110110
/// Set the active timeline and time for the given recording.
111111
SetActiveTime {
112112
store_id: StoreId,
113-
timeline: re_chunk::Timeline,
114-
time: Option<re_log_types::TimeReal>,
115-
116-
/// If this is true the timeline will persist even if it is invalid at the moment.
117-
pending: bool,
113+
timeline: re_chunk::TimelineName,
114+
time: Option<re_log_types::TimeInt>,
118115
},
119116

120117
/// Set the loop selection for the given timeline.

crates/viewer/re_test_context/src/lib.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -595,9 +595,8 @@ impl TestContext {
595595
self.command_sender
596596
.send_system(SystemCommand::SetActiveTime {
597597
store_id,
598-
timeline: re_chunk::Timeline::new(timeline, timecell.typ()),
599-
time: Some(timecell.as_i64().into()),
600-
pending: true,
598+
timeline,
599+
time: Some(timecell.value.into()),
601600
});
602601
}
603602
}
@@ -652,17 +651,16 @@ impl TestContext {
652651
store_id: rec_id,
653652
timeline,
654653
time,
655-
pending: _,
656654
} => {
657655
assert_eq!(
658656
&rec_id,
659657
self.store_hub.lock().active_recording().unwrap().store_id()
660658
);
661659
self.with_blueprint_ctx(|ctx| {
662-
ctx.set_timeline(*timeline.name());
660+
ctx.set_timeline(timeline);
663661

664662
if let Some(time) = time {
665-
ctx.set_time(time.floor());
663+
ctx.set_time(time);
666664
}
667665
});
668666
}

crates/viewer/re_view_dataframe/src/dataframe_ui.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,8 @@ impl egui_table::TableDelegate for DataframeTableDelegate<'_> {
375375
self.ctx.command_sender().send_system(
376376
re_viewer_context::SystemCommand::SetActiveTime {
377377
store_id: self.ctx.store_id().clone(),
378-
timeline: descr.timeline(),
378+
timeline: *descr.timeline().name(),
379379
time: None,
380-
pending: false,
381380
},
382381
);
383382
}

crates/viewer/re_viewer/src/app.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -912,20 +912,16 @@ impl App {
912912

913913
SystemCommand::SetActiveTime {
914914
store_id,
915-
// TODO: Make this only be timeline name.
916915
timeline,
917-
// TODO: Make this be time int?
918916
time,
919-
// TODO: Remove this
920-
pending: _,
921917
} => {
922918
if let Some(blueprint_ctx) =
923919
blueprint_ctx(&mut self.state, &self.command_sender, store_hub)
924920
{
925-
blueprint_ctx.set_timeline(*timeline.name());
921+
blueprint_ctx.set_timeline(timeline);
926922

927923
if let Some(time) = time {
928-
blueprint_ctx.set_time(time.floor());
924+
blueprint_ctx.set_time(time);
929925
}
930926

931927
if let Some(rec_cfg) = self.recording_config_mut(store_hub, &store_id) {
@@ -1157,9 +1153,8 @@ impl App {
11571153
self.command_sender
11581154
.send_system(SystemCommand::SetActiveTime {
11591155
store_id,
1160-
timeline: re_chunk::Timeline::new(timeline, timecell.typ()),
1161-
time: Some(timecell.as_i64().into()),
1162-
pending: true,
1156+
timeline: timeline,
1157+
time: Some(timecell.value.into()),
11631158
});
11641159
}
11651160
}

0 commit comments

Comments
 (0)