BF [3092888] - AltGr+3rd level key fires wrong button

https://sourceforge.net/tracker/?func=detail&atid=879332&aid=3092888&group_id=176962
This commit is contained in:
trifonnt 2011-03-26 00:06:29 -05:00
parent d673117995
commit 6feca8ff98
1 changed files with 6 additions and 0 deletions

View File

@ -27,6 +27,7 @@ package org.compiere.swing;
import java.awt.Color;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import javax.swing.Action;
import javax.swing.Icon;
@ -315,6 +316,11 @@ public class CButton extends JButton implements CEditor {
public void setMnemonic(int mnemonic) {
super.setMnemonic(mnemonic);
// Angelo Dabala' (genied) avoid to register Ctrl+Alt modifier mask without mnemonic
if (mnemonic==KeyEvent.VK_UNDEFINED) {
return;
}
InputMap map = SwingUtilities.getUIInputMap(this,
JComponent.WHEN_IN_FOCUSED_WINDOW);