X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FTreeCanvas.java;h=9fa98ee3e8bdd66651e6e6754e4bd221da4bf210;hb=24680a271861e9309a2241c8884874656ac111b1;hp=0e513f77008dee2bc73b146c90279b8138a4c21c;hpb=853624fb32058cccc544ae7d13af6ad4b0800b6c;p=jalview.git diff --git a/src/jalview/gui/TreeCanvas.java b/src/jalview/gui/TreeCanvas.java index 0e513f7..9fa98ee 100755 --- a/src/jalview/gui/TreeCanvas.java +++ b/src/jalview/gui/TreeCanvas.java @@ -997,17 +997,21 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, } 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()); + // } } - sg.cs = cs; + sg.setColourScheme(cs); + sg.getGroupColourScheme().setThreshold( + av.getViewportColourScheme().getThreshold(), + av.isIgnoreGapsConsensus()); // sg.recalcConservation(); sg.setName("JTreeGroup:" + sg.hashCode()); sg.setIdColour(col); @@ -1015,10 +1019,11 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, for (int a = 0; a < aps.length; a++) { if (aps[a].av.getGlobalColourScheme() != null - && aps[a].av.getGlobalColourScheme().conservationApplied()) + && aps[a].av.getViewportColourScheme() + .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, aps[a].av.getConsPercGaps()); sg.cs.setConservation(c);