diff --git a/.changes/about-macos-event.md b/.changes/about-macos-event.md new file mode 100644 index 00000000..efc1e70a --- /dev/null +++ b/.changes/about-macos-event.md @@ -0,0 +1,5 @@ +--- +"muda": "patch" +--- + +Fix `PredefinedMenuItem::about` sending events where it shouldn't. \ No newline at end of file diff --git a/src/platform_impl/macos/mod.rs b/src/platform_impl/macos/mod.rs index 8ac3b91f..f9694281 100644 --- a/src/platform_impl/macos/mod.rs +++ b/src/platform_impl/macos/mod.rs @@ -1036,14 +1036,14 @@ impl MenuItem { }; } } - } + } else { + if item.item_type == MenuItemType::Check { + item.set_checked(!item.is_checked()); + } - if item.item_type == MenuItemType::Check { - item.set_checked(!item.is_checked()); + let id = (*item).id().clone(); + MenuEvent::send(crate::MenuEvent { id }); } - - let id = (*item).id().clone(); - MenuEvent::send(crate::MenuEvent { id }); } fn create(