Skip to content

Commit

Permalink
Fix filter_map_tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Adanos020 committed Mar 6, 2024
1 parent 1a5036c commit 20f8e25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# egui_dock changelog

## 0.11.3 - 2024-03-06

### Fixed
- `filter_map_tabs` sometimes deleting nodes when it shouldn't.

## 0.11.2 - 2024-02-16

### Fixed
Expand Down
6 changes: 3 additions & 3 deletions src/dock_state/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -750,11 +750,11 @@ impl<Tab> Tree<Tab> {
.iter()
.enumerate()
.map(|(index, node)| {
let node = node.filter_map_tabs(function.clone());
if node.is_empty() {
let filtered_node = node.filter_map_tabs(function.clone());
if filtered_node.is_empty() && !node.is_empty() {
emptied_nodes.insert(NodeIndex(index));
}
node
filtered_node
})
.collect();
let mut new_tree = Tree {
Expand Down

0 comments on commit 20f8e25

Please sign in to comment.