From: tcofoegbu Date: Fri, 26 May 2017 11:35:43 +0000 (+0100) Subject: JAL-1648 fix to transfer focus back to alignment frame when Finder window is close... X-Git-Tag: Release_2_10_2~3^2~45^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fec2d8ea138f11b1d433523690f478f17c69e1fc;p=jalview.git JAL-1648 fix to transfer focus back to alignment frame when Finder window is close via hitting cancel or the excape key --- 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(); + } } }