X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FTreeCanvas.java;fp=src%2Fjalview%2Fappletgui%2FTreeCanvas.java;h=e30879cb8efef0e90fe3238fa6a7026288abfaa2;hb=2595e9d4ee0dbbd3406a98c4e49a61ccde806479;hp=3b509e5bcab6519fb838e010cd7d250d23216ec9;hpb=e20075ba805d744d7cc4976e2b8d5e5840fb0a8d;p=jalview.git diff --git a/src/jalview/appletgui/TreeCanvas.java b/src/jalview/appletgui/TreeCanvas.java index 3b509e5..e30879c 100755 --- a/src/jalview/appletgui/TreeCanvas.java +++ b/src/jalview/appletgui/TreeCanvas.java @@ -656,35 +656,38 @@ public class TreeCanvas extends Panel implements MouseListener, } else { - cs = ColourSchemeProperty.getColour(sg, ColourSchemeProperty - .getColourName(av.getGlobalColourScheme())); + cs = ColourSchemeProperty.getColourScheme(sg, + ColourSchemeProperty.getColourName(av + .getGlobalColourScheme())); } // cs is null if shading is an annotationColourGradient - if (cs != null) - { - cs.setThreshold(av.getGlobalColourScheme().getThreshold(), - av.isIgnoreGapsConsensus()); - } + // if (cs != null) + // { + // cs.setThreshold(av.getViewportColourScheme().getThreshold(), + // av.isIgnoreGapsConsensus()); + // } } // TODO: cs used to be initialized with a sequence collection and // recalcConservation called automatically // instead we set it manually - recalc called after updateAnnotation - sg.cs = cs; + sg.setColourScheme(cs); + sg.getGroupColourScheme().setThreshold( + av.getResidueShading().getThreshold(), + av.isIgnoreGapsConsensus()); sg.setName("JTreeGroup:" + sg.hashCode()); sg.setIdColour(col); if (av.getGlobalColourScheme() != null - && av.getGlobalColourScheme().conservationApplied()) + && av.getResidueShading().conservationApplied()) { - Conservation c = new Conservation("Group", 3, - sg.getSequences(null), sg.getStartRes(), sg.getEndRes()); + Conservation c = new Conservation("Group", sg.getSequences(null), + sg.getStartRes(), sg.getEndRes()); c.calculate(); c.verdict(false, av.getConsPercGaps()); - cs.setConservation(c); - - sg.cs = cs; + sg.setColourScheme(cs); + sg.getGroupColourScheme().setConservation(c); } av.getAlignment().addGroup(sg);