JAL-961 JAL-976 recover current settings from associated viewport
authorjprocter <jprocter@compbio.dundee.ac.uk>
Sun, 8 Jul 2012 14:13:14 +0000 (15:13 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Sun, 8 Jul 2012 14:13:14 +0000 (15:13 +0100)
src/jalview/ws/jws2/AAConsClient.java

index b2c9d4d..c90f5c4 100644 (file)
@@ -5,6 +5,7 @@ import jalview.datamodel.AlignmentI;
 import jalview.datamodel.Annotation;
 import jalview.gui.AlignFrame;
 import jalview.gui.AlignmentPanel;
+import jalview.ws.jws2.dm.AAConsSettings;
 import jalview.ws.jws2.jabaws2.Jws2Instance;
 import jalview.ws.params.WsParamSetI;
 
@@ -29,8 +30,18 @@ public class AAConsClient extends JabawsAlignCalcWorker
     nucleotidesAllowed = false;
     proteinAllowed = true;
     gapMap=new boolean[0];
+    initViewportParams();
   }
 
+  protected void initViewportParams()
+  {
+    ((jalview.gui.AlignViewport) alignViewport).setCalcIdSettingsFor(getCalcId(), new AAConsSettings(true, service, this.preset, (arguments!=null) ?  JabaParamStore.getJwsArgsfromJaba(arguments) : null), true);
+  }
+  @Override
+  public void updateParameters(WsParamSetI newpreset, java.util.List<Argument> newarguments) {
+    super.updateParameters(newpreset, newarguments);
+    initViewportParams();
+  };
   public String getServiceActionText()
   {
     return "calculating Amino acid consensus using AACons service";