Conservation colour scheme is no more
[jalview.git] / src / jalview / gui / TreeCanvas.java
index d05aee1..e923792 100755 (executable)
@@ -715,21 +715,18 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
 \r
                     if (sg.cs != null)\r
                     {\r
-                        ((ResidueColourScheme) sg.cs).setThreshold(25, av.getIgnoreGapsConsensus());\r
+                        sg.cs.setThreshold(25, av.getIgnoreGapsConsensus());\r
                     }\r
 \r
-                    if (av.getGlobalColourScheme() instanceof ConservationColourScheme)\r
+                    if (av.getGlobalColourScheme().conservationApplied())\r
                     {\r
-                        ConservationColourScheme ccs = (ConservationColourScheme) av.getGlobalColourScheme();\r
                         Conservation c = new Conservation("Group",\r
                                 ResidueProperties.propHash, 3, sg.sequences,\r
                                 sg.getStartRes(), sg.getEndRes());\r
 \r
                         c.calculate();\r
                         c.verdict(false, av.ConsPercGaps);\r
-                        ccs = new ConservationColourScheme(c, ccs.cs);\r
-\r
-                        sg.cs = ccs;\r
+                        sg.cs.setConservation(c);\r
                     }\r
 \r
                     av.alignment.addGroup(sg);\r