From: amwaterhouse Date: Fri, 1 Apr 2005 16:44:16 +0000 (+0000) Subject: update conservation and consensus X-Git-Tag: Release_2_0~496 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0b2b9b7570d68da631d657d05e6c7cff019d9a3f;p=jalview.git update conservation and consensus --- diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 8e7141b..9f05887 100755 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -250,7 +250,9 @@ public class SeqPanel extends JPanel // Group editing if (evt.isAltDown() || evt.isControlDown()) { - SequenceGroup sg = av.getAlignment().findGroup(startseq); + SequenceGroup sg = av.getSelectionGroup(); + if(sg==null) + av.getAlignment().findGroup(startseq); if (sg != null) { boolean deleteAllowed = false; @@ -360,21 +362,8 @@ public class SeqPanel extends JPanel void updateConservation(int i) { - /* Alignment al = (Alignment) av.getAlignment(); - SequenceGroup sg = av.alignment.findGroup( al.getSequenceAt(i)); - if(sg==null || !(sg.cs instanceof ConservationColourScheme)) - return; - - Conservation c = sg.getConservation(); - - c = new Conservation("All", al.cons, - ResidueProperties.propHash, 3, sg.sequences, 0, - al.getWidth()); - c.calculate(); - c.verdict(false, 100); - sg.setConservation(c); - ConservationColourScheme ccs = (ConservationColourScheme)sg.cs; - ccs.conserve = c;*/ + av.updateConservation(); + av.updateConsensus(); } ////////////////////////////////////////// @@ -397,7 +386,7 @@ public class SeqPanel extends JPanel if(stretchGroup == null) { stretchGroup = av.alignment.findGroup( sequence ); - if(res>stretchGroup.getStartRes() && resstretchGroup.getStartRes() && res