From 55114834081f0a580e7751a61b9d4e409d3c72a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Thu, 4 Jan 2024 00:14:22 +0100 Subject: [PATCH] missed negation during accessibility refactor (#11206) # Objective - Since #10911, example `button` crashes when clicking the button ``` thread 'main' panicked at .cargo/registry/src/index.crates.io-6f17d22bba15001f/accesskit_consumer-0.16.1/src/tree.rs:139:9: assertion `left == right` failed left: 1 right: 0 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Encountered a panic in system `bevy_winit::accessibility::update_accessibility_nodes`! Encountered a panic in system `bevy_app::main_schedule::Main::run_main`! ``` ## Solution - Re-add lost negation --- crates/bevy_winit/src/accessibility.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_winit/src/accessibility.rs b/crates/bevy_winit/src/accessibility.rs index 309d4fd9cc..50d5b0bdc1 100644 --- a/crates/bevy_winit/src/accessibility.rs +++ b/crates/bevy_winit/src/accessibility.rs @@ -152,7 +152,7 @@ fn queue_node_for_update( window_children: &mut Vec, ) { let should_push = if let Some(parent) = parent { - node_entities.contains(parent.get()) + !node_entities.contains(parent.get()) } else { true };