From: Jim Procter Date: Mon, 15 Jun 2015 13:02:37 +0000 (+0100) Subject: JAL-1775 fix regression from commit 70f9c4700f20a8fa57ed7eb974277d8bad0723c2 X-Git-Tag: Release_2_10_0~608^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8f8e6868f55cfe6ab73b3fe82cfb360f3e71a025;p=jalview.git JAL-1775 fix regression from commit 70f9c4700f20a8fa57ed7eb974277d8bad0723c2 --- diff --git a/src/jalview/io/FileLoader.java b/src/jalview/io/FileLoader.java index e27c666..76bd572 100755 --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@ -338,10 +338,8 @@ public class FileLoader implements Runnable } else { - if (!protocol.equals(AppletFormatAdapter.PASTE)) - { - alignFrame.setFileName(file, format); - } + // otherwise construct the alignFrame + if (source instanceof ComplexAlignFile) { ColumnSelection colSel = ((ComplexAlignFile) source) @@ -365,29 +363,34 @@ public class FileLoader implements Runnable alignFrame = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); } + } + // add metadata and update ui + if (!protocol.equals(AppletFormatAdapter.PASTE)) + { + alignFrame.setFileName(file, format); + } - alignFrame.statusBar.setText(MessageManager.formatMessage( - "label.successfully_loaded_file", new String[] - { title })); + alignFrame.statusBar.setText(MessageManager.formatMessage( + "label.successfully_loaded_file", new String[] + { title })); - if (raiseGUI) - { - // add the window to the GUI - // note - this actually should happen regardless of raiseGUI - // status in Jalview 3 - // TODO: define 'virtual desktop' for benefit of headless scripts - // that perform queries to find the 'current working alignment' - Desktop.addInternalFrame(alignFrame, title, - AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); - } + if (raiseGUI) + { + // add the window to the GUI + // note - this actually should happen regardless of raiseGUI + // status in Jalview 3 + // TODO: define 'virtual desktop' for benefit of headless scripts + // that perform queries to find the 'current working alignment' + Desktop.addInternalFrame(alignFrame, title, + AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); + } - try - { - alignFrame.setMaximum(jalview.bin.Cache.getDefault( - "SHOW_FULLSCREEN", false)); - } catch (java.beans.PropertyVetoException ex) - { - } + try + { + alignFrame.setMaximum(jalview.bin.Cache.getDefault( + "SHOW_FULLSCREEN", false)); + } catch (java.beans.PropertyVetoException ex) + { } } else