Merge branch 'features/JAL-1648_cache_user_inputs' of https://source.jalview.org...
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 26 May 2017 11:46:34 +0000 (12:46 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 26 May 2017 11:46:34 +0000 (12:46 +0100)
src/jalview/gui/Finder.java

index be7f9e5..457d871 100755 (executable)
@@ -128,19 +128,11 @@ public class Finder extends GFinder
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        escapeActionPerformed();
+        closeAction();
       }
     });
   }
 
-  /**
-   * Close the panel on Escape key press
-   */
-  protected void escapeActionPerformed()
-  {
-    setVisible(false);
-    frame.dispose();
-  }
 
   /**
    * Performs the 'Find Next' action.
@@ -395,7 +387,12 @@ public class Finder extends GFinder
 
   protected void closeAction()
   {
+    frame.setVisible(false);
     frame.dispose();
     searchBox.persistCache();
+    if (getFocusedViewport())
+    {
+      ap.alignFrame.requestFocus();
+    }
   }
 }