Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show layout in blueprint tree view #2465

Merged
merged 20 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"args": [
"build",
"--package=rerun-cli",
"--no-default-features",
"--features=native_viewer"
],
"filter": {
Expand All @@ -49,7 +50,9 @@
"cargo": {
"args": [
"build",
"--package=rerun-cli"
"--package=rerun-cli",
"--no-default-features",
"--features=native_viewer"
],
"filter": {
"name": "rerun",
Expand All @@ -68,7 +71,9 @@
"cargo": {
"args": [
"build",
"--package=rerun-cli"
"--package=rerun-cli",
"--no-default-features",
"--features=native_viewer"
],
"filter": {
"name": "rerun",
Expand Down
63 changes: 35 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ debug = true
# As a last resport, patch with a commit to our own repository.
# ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk.

egui_tiles = { git = "https://github.com/rerun-io/egui_tiles.git", rev = "2c07e620dceeab999547ca1053f5ace22c1d14f0" } # TODO: don't merge
egui_tiles = { git = "https://github.com/rerun-io/egui_tiles.git", rev = "bee1b7f69ee1e4b8ddc1d78cd53540545a8f591e" } # TODO: don't merge
3 changes: 1 addition & 2 deletions crates/re_viewport/src/viewport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,10 @@ impl Viewport {
tile_id: egui_tiles::TileId,
container: &mut egui_tiles::Container,
) -> TreeAction {
if container.children().len() == 1 {
if let Some(child_id) = container.only_child() {
// Maybe a tab container with only one child - collapse it in the tree view to make it more easily understood.
// This means we won't be showing the visibility button of the parent container,
// so if the child is made invisible, we should do the same for the parent.
let child_id = container.children()[0];
let child_is_visible = self.tree.is_visible(child_id);
self.tree.set_visible(tile_id, child_is_visible);
return self.tile_ui(ctx, ui, child_id);
Expand Down