fix: request redraw in menus
This commit is contained in:
parent
1ac21a9d99
commit
5fd1ca4220
4 changed files with 14 additions and 3 deletions
|
|
@ -1502,7 +1502,9 @@ where
|
|||
// cursor is outside
|
||||
{
|
||||
|
||||
last_menu_state.index = None;
|
||||
if last_menu_state.index.take().is_some() {
|
||||
shell.request_redraw();
|
||||
}
|
||||
shell.capture_event();
|
||||
return new_menu_root;
|
||||
}
|
||||
|
|
@ -1561,6 +1563,10 @@ where
|
|||
// set new index
|
||||
let old_index = last_menu_state.index.replace(new_index);
|
||||
|
||||
if old_index != Some(new_index) {
|
||||
shell.request_redraw();
|
||||
}
|
||||
|
||||
// get new active item
|
||||
// * add new menu if the new item is a menu
|
||||
if !item.children.is_empty() && old_index.is_none_or(|i| i != new_index) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue