@@ -657,6 +657,8 @@ impl TimePanel {
657
657
entity_data : & EntityData ,
658
658
ui : & mut egui:: Ui ,
659
659
) {
660
+ re_tracing:: profile_function!( ) ;
661
+
660
662
let entity_path = & entity_data. entity_path ;
661
663
let item = TimePanelItem :: entity_path ( entity_path. clone ( ) ) ;
662
664
let is_selected = ctx. selection ( ) . contains_item ( & item. to_item ( ) ) ;
@@ -819,6 +821,8 @@ impl TimePanel {
819
821
entity_data : & EntityData ,
820
822
ui : & mut egui:: Ui ,
821
823
) {
824
+ re_tracing:: profile_function!( ) ;
825
+
822
826
for child in & entity_data. children {
823
827
self . show_entity (
824
828
ctx,
@@ -846,13 +850,6 @@ impl TimePanel {
846
850
let item = TimePanelItem :: component_path ( component_path. clone ( ) ) ;
847
851
let timeline = time_ctrl. timeline ( ) ;
848
852
849
- let component_has_data_in_current_timeline = store
850
- . entity_has_component_on_timeline (
851
- time_ctrl. timeline ( ) ,
852
- entity_path,
853
- & component_name,
854
- ) ;
855
-
856
853
let response = ui
857
854
. list_item ( )
858
855
. render_offscreen ( false )
@@ -957,32 +954,48 @@ impl TimePanel {
957
954
) ;
958
955
959
956
let is_visible = ui. is_rect_visible ( full_width_rect) ;
960
- if is_visible && component_has_data_in_current_timeline {
961
- // show the data in the time area:
962
- let row_rect = Rect :: from_x_y_ranges (
963
- time_area_response. rect . x_range ( ) ,
964
- response_rect. y_range ( ) ,
965
- ) ;
966
957
967
- highlight_timeline_row ( ui, ctx, time_area_painter, & item. to_item ( ) , & row_rect) ;
958
+ if is_visible {
959
+ let component_has_data_in_current_timeline = store
960
+ . entity_has_component_on_timeline (
961
+ time_ctrl. timeline ( ) ,
962
+ entity_path,
963
+ & component_name,
964
+ ) ;
968
965
969
- let db = match self . source {
970
- TimePanelSource :: Recording => ctx. recording ( ) ,
971
- TimePanelSource :: Blueprint => ctx. store_context . blueprint ,
972
- } ;
966
+ if component_has_data_in_current_timeline {
967
+ // show the data in the time area:
968
+ let row_rect = Rect :: from_x_y_ranges (
969
+ time_area_response. rect . x_range ( ) ,
970
+ response_rect. y_range ( ) ,
971
+ ) ;
973
972
974
- data_density_graph:: data_density_graph_ui (
975
- & mut self . data_density_graph_painter ,
976
- ctx,
977
- time_ctrl,
978
- db,
979
- time_area_painter,
980
- ui,
981
- & self . time_ranges_ui ,
982
- row_rect,
983
- & item,
984
- true ,
985
- ) ;
973
+ highlight_timeline_row (
974
+ ui,
975
+ ctx,
976
+ time_area_painter,
977
+ & item. to_item ( ) ,
978
+ & row_rect,
979
+ ) ;
980
+
981
+ let db = match self . source {
982
+ TimePanelSource :: Recording => ctx. recording ( ) ,
983
+ TimePanelSource :: Blueprint => ctx. store_context . blueprint ,
984
+ } ;
985
+
986
+ data_density_graph:: data_density_graph_ui (
987
+ & mut self . data_density_graph_painter ,
988
+ ctx,
989
+ time_ctrl,
990
+ db,
991
+ time_area_painter,
992
+ ui,
993
+ & self . time_ranges_ui ,
994
+ row_rect,
995
+ & item,
996
+ true ,
997
+ ) ;
998
+ }
986
999
}
987
1000
}
988
1001
}
0 commit comments