JAL-1333 allow reuse of existing chimera for new or additional structures
authorj.procter@dundee.ac.uk <jprocter@jims-mbp-2.dyn.lifesci.dundee.ac.uk>
Fri, 18 Jul 2014 12:35:32 +0000 (13:35 +0100)
committerj.procter@dundee.ac.uk <jprocter@jims-mbp-2.dyn.lifesci.dundee.ac.uk>
Fri, 18 Jul 2014 12:35:32 +0000 (13:35 +0100)
src/jalview/gui/ChimeraViewFrame.java

index a3ff00b..815957f 100644 (file)
@@ -689,9 +689,8 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
       jalview.ws.dbsources.Pdb pdbclient = new jalview.ws.dbsources.Pdb();
       for (int pi = 0; pi < jmb.pdbentry.length; pi++)
       {
-        String file = new File(jmb.pdbentry[pi].getFile())
-                .getAbsoluteFile().getPath();
-        if (file == null)
+        String file = null;
+        if (jmb.pdbentry[pi].getFile()==null) 
         {
           // retrieve the pdb and store it locally
           AlignmentI pdbseq = null;
@@ -734,6 +733,8 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
         }
         else
         {
+          file = new File(jmb.pdbentry[pi].getFile())
+          .getAbsoluteFile().getPath();
           if (curfiles != null && curfiles.length > 0)
           {
             addingStructures = true; // already files loaded.