Skip to content

Commit

Permalink
Remove spaceviews from the tree in Viewport::remove
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Jun 17, 2023
1 parent 3bd10d9 commit 5d39114
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

6 changes: 4 additions & 2 deletions crates/re_viewport/src/viewport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,14 @@ impl Viewport {

*has_been_user_edited = true;

// TODO: remove it from `tree`

if *maximized == Some(*space_view_id) {
*maximized = None;
}

if let Some(tile_id) = tree.tiles.find_pane(space_view_id) {
tree.tiles.remove(tile_id);
}

space_views.remove(space_view_id)
}

Expand Down

0 comments on commit 5d39114

Please sign in to comment.