X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileLoader.java;h=6329f5895714b0d4937284edd9111c76c3d15462;hb=b6d073bedc4b28e1a0e5a3a899cfb0e32349087e;hp=38033ff1a19542d495789270535d32b217483027;hpb=ad15cff29620f960119f80176f1fd443da9f6763;p=jalview.git diff --git a/src/jalview/io/FileLoader.java b/src/jalview/io/FileLoader.java index 38033ff..6329f58 100755 --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@ -30,7 +30,6 @@ import jalview.gui.Jalview2XML; import jalview.structure.StructureSelectionManager; import jalview.util.MessageManager; -import java.util.List; import java.util.StringTokenizer; import java.util.Vector; @@ -297,7 +296,7 @@ public class FileLoader implements Runnable // open a new source and read from it FormatAdapter fa = new FormatAdapter(); al = fa.readFile(file, protocol, format); - source = fa.afile; // keep reference for later if necessary. + source = fa.getAlignFile(); // keep reference for later if necessary. } } catch (java.io.IOException ex) { @@ -323,7 +322,7 @@ public class FileLoader implements Runnable } if (sq.getPDBId() != null) { - for (PDBEntry pdbe : (List) sq.getPDBId()) + for (PDBEntry pdbe : sq.getPDBId()) { StructureSelectionManager.getStructureSelectionManager( Desktop.instance).registerPDBEntry(pdbe); @@ -332,13 +331,7 @@ public class FileLoader implements Runnable } if (viewport != null) { - // TODO: create undo object for this JAL-1101 - for (int i = 0; i < al.getHeight(); i++) - { - viewport.getAlignment().addSequence(al.getSequenceAt(i)); - } - viewport.firePropertyChange("alignment", null, viewport - .getAlignment().getSequences()); + viewport.addAlignment(al, title); } else { @@ -355,9 +348,13 @@ public class FileLoader implements Runnable } if (source instanceof HtmlFile) { - ((HtmlFile) source).LoadAlignmentFeatures(alignFrame); - + ((HtmlFile) source).applySettingsToAlignFrame(alignFrame); } + else if (source instanceof JSONFile) + { + ((JSONFile) source).applySettingsToAlignFrame(alignFrame); + } + if (raiseGUI) { // add the window to the GUI