From fec2d8ea138f11b1d433523690f478f17c69e1fc Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Fri, 26 May 2017 12:35:43 +0100 Subject: [PATCH] JAL-1648 fix to transfer focus back to alignment frame when Finder window is close via hitting cancel or the excape key --- src/jalview/gui/Finder.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/jalview/gui/Finder.java b/src/jalview/gui/Finder.java index a314cef..6bee7df 100755 --- a/src/jalview/gui/Finder.java +++ b/src/jalview/gui/Finder.java @@ -121,19 +121,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. @@ -385,7 +377,12 @@ public class Finder extends GFinder protected void closeAction() { + frame.setVisible(false); frame.dispose(); searchBox.persistCache(); + if (getFocusedViewport()) + { + ap.alignFrame.requestFocus(); + } } } -- 1.7.10.2