From: Jim Procter Date: Wed, 5 Aug 2015 17:05:08 +0000 (+0100) Subject: JAL-1821 JAL-1759 make sure we wait around until the current script has finished... X-Git-Tag: Release_2_10_0~549^2~4 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=215cda864f5b16592196795281a622b57c493a04;p=jalview.git JAL-1821 JAL-1759 make sure we wait around until the current script has finished before starting superposition --- diff --git a/src/jalview/gui/AppJmol.java b/src/jalview/gui/AppJmol.java index a16ea68..7876346 100644 --- a/src/jalview/gui/AppJmol.java +++ b/src/jalview/gui/AppJmol.java @@ -748,8 +748,22 @@ public class AppJmol extends StructureViewerBase { public void run() { - alignStructs_withAllAlignPanels(); - // jmb.superposeStructures(ap.av.getAlignment(), -1, null); + if (jmb.viewer.isScriptExecuting()) + { + javax.swing.SwingUtilities.invokeLater(this); + try + { + Thread.sleep(5); + } catch (InterruptedException q) + { + } + ; + return; + } + else + { + alignStructs_withAllAlignPanels(); + } } }); alignAddedStructures = false;