From 215cda864f5b16592196795281a622b57c493a04 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 5 Aug 2015 18:05:08 +0100 Subject: [PATCH] JAL-1821 JAL-1759 make sure we wait around until the current script has finished before starting superposition --- src/jalview/gui/AppJmol.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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; -- 1.7.10.2