From: jprocter Date: Fri, 9 Nov 2012 08:02:00 +0000 (+0000) Subject: constructor takes settings from any existing feature renderer on alignment panel X-Git-Tag: Release_2_8~2^2~8 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d3c7e35559e47e907f3de8df353d0a20e9510fa1;p=jalview.git constructor takes settings from any existing feature renderer on alignment panel --- diff --git a/src/jalview/gui/FeatureRenderer.java b/src/jalview/gui/FeatureRenderer.java index 9df0b28..cc2c048 100755 --- a/src/jalview/gui/FeatureRenderer.java +++ b/src/jalview/gui/FeatureRenderer.java @@ -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);