fix(segmented_button): read the live menu state when drawing the context item
This commit is contained in:
parent
fd20f09729
commit
376f1b8850
1 changed files with 1 additions and 6 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue