JAL-2629 hmmsearch/build/align no longer run after cancelling
authorTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Thu, 24 Aug 2017 13:19:31 +0000 (14:19 +0100)
committerTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Fri, 25 Aug 2017 16:21:02 +0000 (17:21 +0100)
src/jalview/gui/AlignFrame.java

index d1d8a61..38e9423 100644 (file)
@@ -1048,8 +1048,10 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     ParamDatastoreI store = new HMMERParamStore("hmmalign");
     WsJobParameters params = new WsJobParameters(new JFrame(), store, set,
             args);
-    params.showRunDialog();
-    new Thread(new HMMBuildThread(this, params.getJobParams())).start();
+    if (params.showRunDialog())
+    {
+      new Thread(new HMMBuildThread(this, params.getJobParams())).start();
+    }
     alignPanel.repaint();
 
   }
@@ -1067,9 +1069,11 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     ParamDatastoreI store = new HMMERParamStore("hmmalign");
     WsJobParameters params = new WsJobParameters(new JFrame(), store, set,
             args);
-    params.showRunDialog();
-    new Thread(new HMMAlignThread(this, true, params.getJobParams()))
+    if (params.showRunDialog())
+    {
+      new Thread(new HMMAlignThread(this, true, params.getJobParams()))
             .start();
+    }
     alignPanel.repaint();
   }
 
@@ -1085,9 +1089,11 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     ParamDatastoreI store = new HMMERParamStore("hmmsearch");
     WsJobParameters params = new WsJobParameters(new JFrame(), store, set,
             args);
-    params.showRunDialog();
-    new Thread(new HMMSearchThread(this, true, params.getJobParams()))
+    if (params.showRunDialog())
+    {
+      new Thread(new HMMSearchThread(this, true, params.getJobParams()))
             .start();
+    }
     alignPanel.repaint();
   }