Merge branch 'feature/JAL-3551Pymol' into develop
[jalview.git] / src / jalview / ext / jmol / JalviewJmolBinding.java
index 0b37ceb..eee48df 100644 (file)
@@ -118,7 +118,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
   private String jmolScript(String script)
   {
     Cache.log.debug(">>Jmol>> " + script);
-    String s = jmolViewer.scriptWait(script);
+    String s = jmolViewer.evalStringQuiet(script); // scriptWait(script); BH
     Cache.log.debug("<<Jmol<< " + s);
 
     return s;
@@ -598,6 +598,11 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
     modelFileNames = null;
     boolean notifyLoaded = false;
     String[] modelfilenames = getStructureFiles();
+    if (modelfilenames == null)
+    {
+      // Jmol is still loading files!
+      return;
+    }
     // first check if we've lost any structures
     if (oldmodels != null && oldmodels.length > 0)
     {