Skip to content

Commit

Permalink
Also fix the tab title UI
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 committed Mar 21, 2024
1 parent dbb390b commit 741e896
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions crates/re_viewport/src/viewport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -923,9 +923,27 @@ impl TabWidget {
if let Some(Contents::Container(container_id)) =
tab_viewer.contents_per_tile_id.get(&tile_id)
{
let (label, user_named) = if let Some(container_blueprint) =
tab_viewer.viewport_blueprint.container(container_id)
{
(
container_blueprint
.display_name_or_default()
.as_ref()
.into(),
container_blueprint.display_name.is_some(),
)
} else {
re_log::warn_once!("Container {container_id} missing during egui_tiles");
(
tab_viewer.ctx.re_ui.error_text("Internal error").into(),
false,
)
};

TabDesc {
label: format!("{:?}", container.kind()).into(),
user_named: false,
label,
user_named,
icon: icon_for_container_kind(&container.kind()),
item: Some(Item::Container(*container_id)),
}
Expand Down

0 comments on commit 741e896

Please sign in to comment.