constructor takes settings from any existing feature renderer on alignment panel
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 9 Nov 2012 08:02:00 +0000 (08:02 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 9 Nov 2012 08:02:00 +0000 (08:02 +0000)
src/jalview/gui/FeatureRenderer.java

index 9df0b28..cc2c048 100755 (executable)
@@ -80,6 +80,11 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer
   {
     this.ap = ap;
     this.av = ap.av;
+    if (ap != null && ap.seqPanel != null && ap.seqPanel.seqCanvas != null
+            && ap.seqPanel.seqCanvas.fr != null)
+    {
+      transferSettings(ap.seqPanel.seqCanvas.fr);
+    }
   }
 
   public class FeatureRendererSettings implements Cloneable
@@ -163,7 +168,10 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer
     this.transparency = fr.transparency;
     this.featureOrder = fr.featureOrder;
   }
-
+  /**
+   * update from another feature renderer
+   * @param fr settings to copy
+   */
   public void transferSettings(FeatureRenderer fr)
   {
     FeatureRendererSettings frs = new FeatureRendererSettings(fr);