From 678a9117ff8ac44ec413e1efa0a3f8261261c614 Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Fri, 26 Oct 2007 17:00:44 +0000 Subject: [PATCH] BF [ 1820778 ] ESC(cancel editing) key not working if you are on VComboBox * added some @Override annotations --- client/src/org/compiere/grid/ed/AutoCompletion.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/org/compiere/grid/ed/AutoCompletion.java b/client/src/org/compiere/grid/ed/AutoCompletion.java index 7611541c96..b9c853389a 100644 --- a/client/src/org/compiere/grid/ed/AutoCompletion.java +++ b/client/src/org/compiere/grid/ed/AutoCompletion.java @@ -49,6 +49,10 @@ public class AutoCompletion extends PlainDocument { if (e.getKeyChar() == KeyEvent.CHAR_UNDEFINED) { return; } + // Ignore ESC key - teo_sarca BF [ 1820778 ] + if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { + return; + } if (comboBox.isDisplayable()) comboBox.setPopupVisible(true); hitBackspace=false; @@ -104,6 +108,7 @@ public class AutoCompletion extends PlainDocument { } } + @Override public void remove(int offs, int len) throws BadLocationException { // return immediately when selecting an item if (selecting) return; @@ -122,6 +127,7 @@ public class AutoCompletion extends PlainDocument { } } + @Override public void insertString(int offs, String str, AttributeSet a) throws BadLocationException { if (selecting) return;