changeset 6350:590f14cdb1af 8u20-b03

RT-35982: revert code in ContextMenuContent that handles mnemonic duplicates pending RT-35987
author David Grieve<david.grieve@oracle.com>
date Mon, 24 Feb 2014 12:44:20 -0500
parents c1cd8f98f3aa
children 76d1ce5ed6f4 4f7f68a21236
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuContent.java
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuContent.java	Mon Feb 24 15:20:43 2014 +0200
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuContent.java	Mon Feb 24 12:44:20 2014 -0500
@@ -424,10 +424,8 @@
         int index = getLongestLabel();
         itemsContainer.getChildren().clear();
         if (!getItems().isEmpty()) {
-            // We need to strip mnemonic symbols to avoid mnemonic duplicates
-            String itemText = new TextBinding(getItems().get(index).getText()).getText().
-                    replaceAll("_", "__").replaceAll("@", "@@");
-            MenuItemContainer menuItemContainer = new MenuItemContainer(new MenuItem(itemText));
+            final MenuItem item = getItems().get(index);
+            MenuItemContainer menuItemContainer = new MenuItemContainer(item);
             itemsContainer.getChildren().add(menuItemContainer);
         }
     }