@Override
public void reload_actionPerformed(ActionEvent e)
{
+ System.out.println("AlignFrame.reload " + fileName);
if (fileName != null)
{
// TODO: JAL-1108 - ensure all associated frames are closed regardless of
DataSourceType protocol = fileName.startsWith("http:")
? DataSourceType.URL
: DataSourceType.FILE;
- loader.loadFile(viewport, fileName, protocol, currentFileFormat);
+ loader.loadFile(viewport,
+ (fileObject == null ? fileName : fileObject), protocol,
+ currentFileFormat);
}
else
{
public boolean attemptversion1parse = false;
/**
+ * JalviewJS only -- to preserve bytes in AlignFrame
+ *
+ * BH 2019 JAL-3436
+ */
+ private File file;
+
+ /**
* Load a jalview project archive from a jar file
*
* @param file
String file = (ofile instanceof File ? ((File) ofile).getCanonicalPath() : ofile.toString());
byte[] bytes = Platform.isJS() ? Platform.getFileBytes((File) ofile)
: null;
+ if (bytes != null)
+ {
+ this.file = (File) ofile;
+ }
URL url = null;
errorMessage = null;
uniqueSetSuffix = null;
}
}
- AlignFrame loadViewport(String file, List<JSeq> JSEQ,
+ AlignFrame loadViewport(String fileName, List<JSeq> JSEQ,
List<SequenceI> hiddenSeqs, AlignmentI al, JalviewModel jm,
Viewport view, String uniqueSeqSetId, String viewId,
List<JvAnnotRow> autoAlan)
// }
;
af.alignPanel.setHoldRepaint(true);
- af.setFileName(file, FileFormat.Jalview);
+ af.setFileName(fileName, FileFormat.Jalview);
+ af.setFileObject(file); // BH 2019 JAL-3436
final AlignViewport viewport = af.getViewport();
for (int i = 0; i < JSEQ.size(); i++)