JAL-516 JAL-759 JAL-1066 group & group colourscheme always gets notified when group...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 24 Sep 2012 16:47:16 +0000 (17:47 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 24 Sep 2012 16:47:16 +0000 (17:47 +0100)
src/jalview/appletgui/SeqPanel.java
src/jalview/gui/SeqPanel.java

index 744a941..a7345db 100644 (file)
@@ -1411,27 +1411,16 @@ public class SeqPanel extends Panel implements MouseMotionListener,
       return;
     }
 
+    stretchGroup.recalcConservation(); // always do this - annotation has own
+                                       // state
     if (stretchGroup.cs != null)
     {
-      if (stretchGroup.cs instanceof ClustalxColourScheme)
-      {
-        ((ClustalxColourScheme) stretchGroup.cs).alignmentChanged(
-stretchGroup,av.getHiddenRepSequences());
-      }
-
-      if (stretchGroup.cs instanceof Blosum62ColourScheme
-              || stretchGroup.cs instanceof PIDColourScheme
-              || stretchGroup.cs.conservationApplied()
-              || stretchGroup.cs.getThreshold() > 0)
-      {
-        stretchGroup.recalcConservation();
-      }
-
+      stretchGroup.cs.alignmentChanged(stretchGroup,av.getHiddenRepSequences());
+      
       if (stretchGroup.cs.conservationApplied())
       {
         SliderPanel.setConservationSlider(ap, stretchGroup.cs,
                 stretchGroup.getName());
-        stretchGroup.recalcConservation();
       }
       else
       {
index 4fac4fc..8d81f8c 100644 (file)
@@ -1557,11 +1557,8 @@ public class SeqPanel extends JPanel implements MouseListener,
                                        // state
     if (stretchGroup.cs != null)
     {
-      if (stretchGroup.cs instanceof ClustalxColourScheme)
-      {
-        ((ClustalxColourScheme) stretchGroup.cs).alignmentChanged(
+      stretchGroup.cs.alignmentChanged(
                 stretchGroup,av.getHiddenRepSequences());
-      }
 
       if (stretchGroup.cs.conservationApplied())
       {