Merge branch 'releases/Release_2_11_3_Branch'
[jalview.git] / src / jalview / gui / PymolViewer.java
index 9dc28c8..52c253d 100644 (file)
@@ -270,9 +270,18 @@ public class PymolViewer extends StructureViewerBase
               stopProgressBar("", startTime);
             }
 
-            StructureFile pdb = binding.getSsm().setMapping(
-                    binding.getSequence()[pos], binding.getChains()[pos],
-                    pe.getFile(), protocol, getProgressIndicator());
+            StructureFile pdb = null;
+            if (pe.hasStructureFile())
+            {
+              pdb = pe.getStructureFile();
+              Console.debug("(Re)Using StructureFile " + pdb.getId());
+            }
+            else
+            {
+              pdb = binding.getSsm().setMapping(binding.getSequence()[pos],
+                      binding.getChains()[pos], pe.getFile(), protocol,
+                      getProgressIndicator());
+            }
             binding.stashFoundChains(pdb, pe.getFile());
           } catch (Exception ex)
           {