JAL-1648 code fix - enter key should pick selected item on finder searchbox
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 29 May 2017 12:05:05 +0000 (13:05 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 29 May 2017 12:05:05 +0000 (13:05 +0100)
src/jalview/jbgui/GFinder.java

index bbd20ca..00b4fdc 100755 (executable)
@@ -33,7 +33,6 @@ import java.awt.Font;
 import java.awt.GridLayout;
 import java.awt.Insets;
 import java.awt.event.ActionEvent;
-import java.awt.event.KeyEvent;
 
 import javax.swing.JButton;
 import javax.swing.JCheckBox;
@@ -143,15 +142,6 @@ public class GFinder extends JPanel
         textfield_caretUpdate(e);
       }
     });
-    searchBox.getEditor().getEditorComponent()
-            .addKeyListener(new java.awt.event.KeyAdapter()
-    {
-      @Override
-      public void keyPressed(KeyEvent e)
-      {
-        textfield_keyPressed(e);
-      }
-    });
 
     mainBorderLayout.setHgap(5);
     mainBorderLayout.setVgap(5);
@@ -194,14 +184,6 @@ public class GFinder extends JPanel
   {
   }
 
-  protected void textfield_keyPressed(KeyEvent e)
-  {
-    if (e.getKeyCode() == KeyEvent.VK_ENTER)
-    {
-      e.consume();
-      findNext_actionPerformed(null);
-    }
-  }
 
   public void createFeatures_actionPerformed()
   {