group autocalc annotation update logic (still broken)
authorjprocter <Jim Procter>
Fri, 26 Mar 2010 12:26:36 +0000 (12:26 +0000)
committerjprocter <Jim Procter>
Fri, 26 Mar 2010 12:26:36 +0000 (12:26 +0000)
src/jalview/gui/SeqPanel.java

index e32c5cf..a961928 100755 (executable)
@@ -1627,6 +1627,7 @@ public class SeqPanel extends JPanel implements MouseListener,
       return;
     }
 
+    stretchGroup.recalcConservation(); // always do this - annotation has own state
     if (stretchGroup.cs != null)
     {
       if (stretchGroup.cs instanceof ClustalxColourScheme)
@@ -1636,14 +1637,6 @@ public class SeqPanel extends JPanel implements MouseListener,
                 .getWidth());
       }
 
-      if (stretchGroup.cs instanceof Blosum62ColourScheme
-              || stretchGroup.cs instanceof PIDColourScheme
-              || stretchGroup.cs.conservationApplied()
-              || stretchGroup.cs.getThreshold() > 0)
-      {
-        stretchGroup.recalcConservation();
-      }
-
       if (stretchGroup.cs.conservationApplied())
       {
         SliderPanel.setConservationSlider(ap, stretchGroup.cs, stretchGroup
@@ -1654,9 +1647,9 @@ public class SeqPanel extends JPanel implements MouseListener,
         SliderPanel.setPIDSliderSource(ap, stretchGroup.cs, stretchGroup
                 .getName());
       }
-      PaintRefresher.Refresh(this, av.getSequenceSetId());
-      ap.paintAlignment(true);
     }
+    PaintRefresher.Refresh(this, av.getSequenceSetId());
+    ap.paintAlignment(true);
 
     changeEndRes = false;
     changeStartRes = false;