fix(segmented_button): read the live menu state when drawing the context item

This commit is contained in:
Hojjat 2026-09-08 12:46:39 -06:00 • committed by Michael Murphy
parent fd20f09729
commit 376f1b8850

View file

@ -2205,12 +2205,7 @@ where
let menu_open = || { let menu_open = || {
state.show_context == Some(key) state.show_context == Some(key)
&& !tree.children.is_empty() && state.menu_state.inner.with_data(|data| data.open)
&& tree.children[0]
.state
.downcast_ref::<MenuBarState>()
.inner
.with_data(|data| data.open)
}; };
let key_is_active = self.model.is_active(key); let key_is_active = self.model.is_active(key);