JAL-2130 now simply viewer.dispose() to close down Jmol threads
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 23 Jun 2016 14:26:03 +0000 (15:26 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 23 Jun 2016 14:26:03 +0000 (15:26 +0100)
src/jalview/ext/jmol/JalviewJmolBinding.java

index 2133f2b..2ccf118 100644 (file)
@@ -57,7 +57,6 @@ import org.jmol.api.JmolStatusListener;
 import org.jmol.api.JmolViewer;
 import org.jmol.c.CBK;
 import org.jmol.script.T;
-import org.jmol.viewer.JC;
 import org.jmol.viewer.Viewer;
 
 public abstract class JalviewJmolBinding extends AAStructureBindingModel
@@ -170,13 +169,9 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
 
   public void closeViewer()
   {
-    viewer.acm.setModeMouse(JC.MOUSE_NONE);
     // remove listeners for all structures in viewer
     getSsm().removeStructureViewerListener(this, this.getPdbFile());
-    // and shut down jmol
-    viewer.evalStringQuiet("zap");
-    viewer.setJmolStatusListener(null);
-    viewer.dispose();
+     viewer.dispose();
     lastCommand = null;
     viewer = null;
     releaseUIResources();