mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-24 10:09:01 -06:00
MENU-BAR: a rebuilt native menu applies the keys' yield state in the same frame
This commit is contained in:
@@ -478,8 +478,9 @@ impl NativeMenu {
|
||||
}
|
||||
let bar = menu_bar(app);
|
||||
if structure_of(&bar) != self.structure {
|
||||
// (no early return: a rebuild installs every accelerator and resets the state they were synced
|
||||
// to, so the sync below runs in this same frame and no key reaches the menu in between)
|
||||
self.rebuild(app);
|
||||
return quit;
|
||||
}
|
||||
fn walk(nodes: &[MenuNode], items: &mut HashMap<String, Item>) {
|
||||
for n in nodes {
|
||||
|
||||
Reference in New Issue
Block a user