Fixed a crash in Switcher

I'm not sure exactly what caused this that other simpler cases were not,
but essentially nodes were already removed once by the time this loop is
evaluated, so we can skip adding them back to the list again.
This commit is contained in:
Jonathan Johnson 2024-05-13 08:39:43 -07:00
parent 774a846210
commit 3da08bca62
No known key found for this signature in database
GPG key ID: A66D6A34D6620579
2 changed files with 6 additions and 1 deletions

View file

@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
### Fixed
- Fixed a panic that could occur when removing some deeply nested hierarchies
from a window.
### Added
- `AnimationRecorder::animate_keypress` is a new helper that animates a single

View file

@ -506,7 +506,7 @@ impl TreeData {
removed_node
.children
.into_iter()
.map(|id| self.nodes[id].widget.id()),
.filter_map(|id| self.nodes.get(id).map(|node| node.widget.id())),
);
if let Some(next_focus) = removed_node.widget.next_focus() {