There was an error while loading. Please reload this page.
1 parent 0b58da3 commit daeea1bCopy full SHA for daeea1b
1 file changed
src/platform_impl/gtk4/mod.rs
@@ -801,9 +801,12 @@ impl PlatformMenuItem {
801
let gtk_accelerator = accelerator.and_then(MenuAccelerator::to_gtk);
802
803
for item in self.instances.values().flat_map(|v| v.iter()) {
804
- if let Some(accelerator) = gtk_accelerator.as_ref() {
805
- let app = item.application();
806
- app.set_accels_for_action(&detailed_action, &[accelerator]);
+ let app = item.application();
+ match gtk_accelerator.as_ref() {
+ Some(accelerator) => {
807
+ app.set_accels_for_action(&detailed_action, &[accelerator]);
808
+ }
809
+ None => app.set_accels_for_action(&detailed_action, &[]),
810
}
811
812
0 commit comments