moved loadingFromArchive flag modification to after GUI refreshes are completed and...
[jalview.git] / src / jalview / ext / jmol / JalviewJmolBinding.java
index 67327c1..8ea1c5d 100644 (file)
@@ -1270,7 +1270,6 @@ public abstract class JalviewJmolBinding implements StructureListener,
     {
       viewer.evalStringQuiet("model 0; select backbone;restrict;cartoon;wireframe off;spacefill off");
     }
-    setLoadingFromArchive(false);
     // register ourselves as a listener and notify the gui that it needs to
     // update itself.
     ssm.addStructureViewerListener(this);
@@ -1284,6 +1283,7 @@ public abstract class JalviewJmolBinding implements StructureListener,
       refreshGUI();
       loadNotifiesHandled++;
     }
+    setLoadingFromArchive(false);
   }
 
   public void notifyNewPickingModeMeasurement(int iatom, String strMeasure)
@@ -1324,6 +1324,13 @@ public abstract class JalviewJmolBinding implements StructureListener,
 
   }
 
+  /**
+   * function to colour all structures using the given Jalview colourscheme.
+   * This disables the colourBySequence flag but does not record the
+   * colourscheme used for use later.
+   * 
+   * @param cs
+   */
   public void setJalviewColourScheme(ColourSchemeI cs)
   {
     colourBySequence = false;
@@ -1419,6 +1426,9 @@ public abstract class JalviewJmolBinding implements StructureListener,
           String commandOptions, final Container consolePanel,
           String buttonsToShow)
   {
+    if (commandOptions==null) {
+      commandOptions="";
+    }
     viewer = JmolViewer.allocateViewer(renderPanel,
             (jmolfileio ? new SmarterJmolAdapter() : null), htmlName
                     + ((Object) this).toString(), documentBase, codeBase,