layout/tiling: enumerate all children before swapping
This commit is contained in:
parent
450cc6a323
commit
e5a7dfbdb0
1 changed files with 6 additions and 6 deletions
|
|
@ -895,6 +895,12 @@ impl TilingLayout {
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|child_id| (other_desc.node.clone(), child_id.clone()))
|
.map(|child_id| (other_desc.node.clone(), child_id.clone()))
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
let mut other_children = other_node
|
||||||
|
.children()
|
||||||
|
.into_iter()
|
||||||
|
.map(|child_id| (this_desc.node.clone(), child_id.clone()))
|
||||||
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
while !this_children.is_empty() {
|
while !this_children.is_empty() {
|
||||||
for (parent_id, child_id) in std::mem::take(&mut this_children) {
|
for (parent_id, child_id) in std::mem::take(&mut this_children) {
|
||||||
let new_children = this_tree
|
let new_children = this_tree
|
||||||
|
|
@ -935,12 +941,6 @@ impl TilingLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let other_node = other_tree.get_mut(&other_desc.node).ok()?;
|
|
||||||
let mut other_children = other_node
|
|
||||||
.children()
|
|
||||||
.into_iter()
|
|
||||||
.map(|child_id| (this_desc.node.clone(), child_id.clone()))
|
|
||||||
.collect::<Vec<_>>();
|
|
||||||
while !other_children.is_empty() {
|
while !other_children.is_empty() {
|
||||||
for (parent_id, child_id) in std::mem::take(&mut other_children) {
|
for (parent_id, child_id) in std::mem::take(&mut other_children) {
|
||||||
let new_children = other_tree
|
let new_children = other_tree
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue