Do a loop for multiple seq matches
[jalview.git] / src / jalview / io / FileLoader.java
index f720804..0fc4aa8 100755 (executable)
@@ -122,8 +122,12 @@ public class FileLoader
     AlignFrame af;\r
 \r
 \r
+\r
     public void run()\r
     {\r
+      if (Desktop.instance != null)\r
+        Desktop.instance.startLoading(file);\r
+\r
       SequenceI[] sequences = null;\r
 \r
       if (format.equalsIgnoreCase("Jalview"))\r
@@ -164,11 +168,6 @@ public class FileLoader
             Desktop.addInternalFrame(af, file, AlignFrame.NEW_WINDOW_WIDTH,\r
                                      AlignFrame.NEW_WINDOW_HEIGHT);\r
 \r
-            if(jalview.bin.Cache.getDefault("WRAP_ALIGNMENT", false))\r
-            {\r
-              af.wrapMenuItem.setSelected(true);\r
-              af.wrapMenuItem_actionPerformed(null);\r
-            }\r
             try\r
             {\r
               af.setMaximum(jalview.bin.Cache.getDefault("SHOW_FULLSCREEN", false));\r
@@ -177,10 +176,12 @@ public class FileLoader
             {\r
             }\r
           }\r
-\r
         }\r
         else\r
         {\r
+          if (Desktop.instance != null)\r
+            Desktop.instance.stopLoading();\r
+\r
           JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
                                                 "Couldn't load file " + file +\r
                                                 "\n"\r
@@ -194,6 +195,10 @@ public class FileLoader
       {\r
         updateRecentlyOpened();\r
       }\r
+\r
+      if (Desktop.instance != null)\r
+        Desktop.instance.stopLoading();\r
+\r
     }\r
   }\r
 \r