X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileLoader.java;h=0fc4aa86af4e812147062be4bef39a366332c8ca;hb=37a5dfc3c72a42689e90ad8a0e118e8855d9868b;hp=7db0b9041a6b39ea56fb06a87b1af2cb284daa7c;hpb=ca91ef118ff467dee590a67d8ea762c98451660a;p=jalview.git diff --git a/src/jalview/io/FileLoader.java b/src/jalview/io/FileLoader.java index 7db0b90..0fc4aa8 100755 --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@ -125,7 +125,8 @@ public class FileLoader public void run() { - Desktop.instance.startLoading(file); + if (Desktop.instance != null) + Desktop.instance.startLoading(file); SequenceI[] sequences = null; @@ -167,11 +168,6 @@ public class FileLoader Desktop.addInternalFrame(af, file, AlignFrame.NEW_WINDOW_WIDTH, AlignFrame.NEW_WINDOW_HEIGHT); - if(jalview.bin.Cache.getDefault("WRAP_ALIGNMENT", false)) - { - af.wrapMenuItem.setSelected(true); - af.wrapMenuItem_actionPerformed(null); - } try { af.setMaximum(jalview.bin.Cache.getDefault("SHOW_FULLSCREEN", false)); @@ -180,10 +176,12 @@ public class FileLoader { } } - } else { + if (Desktop.instance != null) + Desktop.instance.stopLoading(); + JOptionPane.showInternalMessageDialog(Desktop.desktop, "Couldn't load file " + file + "\n" @@ -198,7 +196,9 @@ public class FileLoader updateRecentlyOpened(); } - Desktop.instance.stopLoading(); + if (Desktop.instance != null) + Desktop.instance.stopLoading(); + } }