JAL-1775 fix regression from commit 70f9c4700f20a8fa57ed7eb974277d8bad0723c2
authorJim Procter <jprocter@issues.jalview.org>
Mon, 15 Jun 2015 13:02:37 +0000 (14:02 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Mon, 15 Jun 2015 13:02:37 +0000 (14:02 +0100)
src/jalview/io/FileLoader.java

index e27c666..76bd572 100755 (executable)
@@ -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