From 0899f9541714086b75987a4ba3d35037a6d6224b Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 24 Sep 2012 17:47:16 +0100 Subject: [PATCH] JAL-516 JAL-759 JAL-1066 group & group colourscheme always gets notified when group membership changes --- src/jalview/appletgui/SeqPanel.java | 19 ++++--------------- src/jalview/gui/SeqPanel.java | 5 +---- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/src/jalview/appletgui/SeqPanel.java b/src/jalview/appletgui/SeqPanel.java index 744a941..a7345db 100644 --- a/src/jalview/appletgui/SeqPanel.java +++ b/src/jalview/appletgui/SeqPanel.java @@ -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 { diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 4fac4fc..8d81f8c 100644 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -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()) { -- 1.7.10.2