From 044b12b8c13a05f3e7769e4154b3ce1af75912a5 Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Thu, 29 Mar 2012 17:31:48 +0400 Subject: [PATCH] 7124551: [macosx] Once added, Menu shortcut cannot be removed Reviewed-by: art, anthony --- jdk/src/macosx/native/sun/awt/CMenuItem.m | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/jdk/src/macosx/native/sun/awt/CMenuItem.m b/jdk/src/macosx/native/sun/awt/CMenuItem.m index 5fdf7113638..aa0c2ab03a2 100644 --- a/jdk/src/macosx/native/sun/awt/CMenuItem.m +++ b/jdk/src/macosx/native/sun/awt/CMenuItem.m @@ -125,11 +125,8 @@ AWT_ASSERT_NOT_APPKIT_THREAD; [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){ AWT_ASSERT_APPKIT_THREAD; - - if (![theKeyEquivalent isEqualToString:@""]) { - [fMenuItem setKeyEquivalent:theKeyEquivalent]; - [fMenuItem setKeyEquivalentModifierMask:modifierMask]; - } + [fMenuItem setKeyEquivalent:theKeyEquivalent]; + [fMenuItem setKeyEquivalentModifierMask:modifierMask]; [fMenuItem setTitle:theLabel]; }]; }