From d3c7e35559e47e907f3de8df353d0a20e9510fa1 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 9 Nov 2012 08:02:00 +0000 Subject: [PATCH] constructor takes settings from any existing feature renderer on alignment panel --- src/jalview/gui/FeatureRenderer.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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); -- 1.7.10.2