// recover PDB filename for the model hovered over.\r
pdbfilename = viewer\r
.getModelFileName(new Integer(mdlId).intValue() - 1);\r
+ \r
} catch (Exception e)\r
{\r
}\r
}\r
else\r
{\r
- if (matches = pdbentry[pe].getFile().equals(fileName))\r
+ File fl;\r
+ if (matches = (fl=new File(pdbentry[pe].getFile())).equals(new File(fileName)))\r
{\r
foundEntry = true;\r
// TODO: Jmol can in principle retrieve from CLASSLOADER but\r
String protocol = AppletFormatAdapter.URL;\r
try\r
{\r
- File fl = new java.io.File(pdbentry[pe].getFile());\r
if (fl.exists())\r
{\r
protocol = AppletFormatAdapter.FILE;\r
} catch (Error e)\r
{\r
}\r
- ;\r
+ //Explicitly map to the filename used by Jmol ;\r
pdb = ssm.setMapping(sequence[pe], chains[pe],\r
- pdbentry[pe].getFile(), protocol);\r
+ fileName, protocol);\r
+ //pdbentry[pe].getFile(), protocol);\r
\r
}\r
}\r
{\r
String chid = new String(pdb.id + ":"\r
+ ((MCview.PDBChain) pdb.chains.elementAt(i)).id);\r
- chainFile.put(chid, pdbentry[pe].getFile());\r
+ chainFile.put(chid, fileName);\r
chainNames.addElement(chid);\r
}\r
notifyLoaded = true;\r
{
// just transfer the file name from the first sequence's first
// PDBEntry
- jmb.pdbentry[pi].setFile(file = ((PDBEntry) pdbseq
- .getSequenceAt(0).getPDBId().elementAt(0)).getFile());
+ file = new File(((PDBEntry) pdbseq
+ .getSequenceAt(0).getPDBId().elementAt(0)).getFile()).toURI().getPath().substring(1);
+ jmb.pdbentry[pi].setFile(file);
- files.append(" \"" + jalview.util.Platform.escapeString(file) + "\"");
+ files.append(" \"" + file + "\"");
}
else
{
}
if (file != null)
{
- files.append(" \"" + jalview.util.Platform.escapeString(file) + "\"");
+ files.append(" \"" + file + "\"");
}
}
}