JAL-3806 todo - problem seems to be Protein:Many CDS are not selected
[jalview.git] / src / jalview / gui / StructureViewerBase.java
index 1c0f43e..ae2128b 100644 (file)
@@ -1156,12 +1156,14 @@ public abstract class StructureViewerBase extends GStructureViewer
     {
       if (afclient.isValidReference(pdbid))
       {
-        pdbseq = afclient.getSequenceRecords(pdbid);
+        pdbseq = afclient.getSequenceRecords(pdbid,processingEntry.getRetrievalUrl());
       } else {
           if (processingEntry.hasRetrievalUrl())
           {
+            String safePDBId = java.net.URLEncoder.encode(pdbid,"UTF-8");
+                     
             // retrieve from URL to new local tmpfile
-            File tmpFile = File.createTempFile(pdbid,
+            File tmpFile = File.createTempFile(safePDBId,
                     "." + (PDBEntry.Type.MMCIF.toString().equals(
                             processingEntry.getType().toString()) ? "cif"
                                     : "pdb"));