From 8f8e6868f55cfe6ab73b3fe82cfb360f3e71a025 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 15 Jun 2015 14:02:37 +0100 Subject: [PATCH] JAL-1775 fix regression from commit 70f9c4700f20a8fa57ed7eb974277d8bad0723c2 --- src/jalview/io/FileLoader.java | 51 +++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 24 deletions(-) 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 -- 1.7.10.2