summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d990844)
-- fix for Jalview projects reload where reload was using just the file
name.
-- will test further to ensure this is only in relation to JVP files
@Override
public void reload_actionPerformed(ActionEvent e)
{
@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
if (fileName != null)
{
// TODO: JAL-1108 - ensure all associated frames are closed regardless of
DataSourceType protocol = fileName.startsWith("http:")
? DataSourceType.URL
: DataSourceType.FILE;
DataSourceType protocol = fileName.startsWith("http:")
? DataSourceType.URL
: DataSourceType.FILE;
- loader.loadFile(viewport, fileName, protocol, currentFileFormat);
+ loader.loadFile(viewport,
+ (fileObject == null ? fileName : fileObject), protocol,
+ currentFileFormat);
public boolean attemptversion1parse = false;
/**
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
* 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;
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;
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)
List<SequenceI> hiddenSeqs, AlignmentI al, JalviewModel jm,
Viewport view, String uniqueSeqSetId, String viewId,
List<JvAnnotRow> autoAlan)
// }
;
af.alignPanel.setHoldRepaint(true);
// }
;
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++)
final AlignViewport viewport = af.getViewport();
for (int i = 0; i < JSEQ.size(); i++)