View | Details | Raw Unified | Return to bug 208626
Collapse All | Expand All

(-)src/org/eclipse/jface/action/MenuManager.java (-1 / +11 lines)
Lines 895-901 Link Here
895
                            char character = Character.toUpperCase(text
895
                            char character = Character.toUpperCase(text
896
                                    .charAt(index + 1));
896
                                    .charAt(index + 1));
897
897
898
                            if (callback.isAcceleratorInUse(SWT.ALT | character)) {
898
                            if (callback.isAcceleratorInUse(SWT.ALT | character) && isTopLevelMenu()) {
899
                                if (index == 0) {
899
                                if (index == 0) {
900
    								text = text.substring(1);
900
    								text = text.substring(1);
901
    							} else {
901
    							} else {
Lines 918-923 Link Here
918
        }
918
        }
919
    }
919
    }
920
920
921
	private boolean isTopLevelMenu() {
922
		if (menu != null && !menu.isDisposed() && menuItem != null
923
				&& !menuItem.isDisposed()) {
924
			Menu parentMenu = menuItem.getParent();
925
			return parentMenu != null
926
					&& ((parentMenu.getStyle() & SWT.BAR) == SWT.BAR);
927
		}
928
		return false;
929
	}
930
921
	/**
931
	/**
922
	 * Dispose any images allocated for this menu
932
	 * Dispose any images allocated for this menu
923
	 */
933
	 */

Return to bug 208626