From: amwaterhouse Date: Wed, 21 Sep 2005 17:07:57 +0000 (+0000) Subject: Next active Frame losing focus bug fixed X-Git-Tag: Release_2_06~29 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1ee3386743590a8b6d98f6c8839eae1b390c7f3b;p=jalview.git Next active Frame losing focus bug fixed --- diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 99b24d3..037a7a9 100755 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -187,6 +187,9 @@ public class Desktop extends jalview.jbgui.GDesktop { openFrameCount--; windowMenu.remove(menuItem); + JInternalFrame itf = desktop.getSelectedFrame(); + if (itf != null) + itf.requestFocus(); } ; }); @@ -364,17 +367,18 @@ public class Desktop extends jalview.jbgui.GDesktop */ public void inputURLMenuItem_actionPerformed(ActionEvent e) { - String url = JOptionPane.showInternalInputDialog(Desktop.desktop, + Object reply = JOptionPane.showInternalInputDialog(Desktop.desktop, "Enter url of input file", "Input alignment from URL", - JOptionPane.QUESTION_MESSAGE, null, null, "http://www.") - .toString(); + JOptionPane.QUESTION_MESSAGE, null, null, "http://www."); - if (url == null) + if (reply == null) { return; } - if (url.trim().toLowerCase().endsWith(".jar")) + String url = reply.toString().trim(); + + if (url.toLowerCase().endsWith(".jar")) { jalview.bin.Cache.setProperty("DEFAULT_FILE_FORMAT", "Jalview"); Jalview2XML.LoadJalviewAlign(url);