X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FSeqPanel.java;h=3bfc7db208167d24399600f1dc45066af77ad169;hb=1340920fd1b15c9bc8cd2284def7ec176a4989d5;hp=8e7141be41852f6a4f0b5db85d3191f82a79c3ef;hpb=f602f5590ae442664ecd8024087a62f71f00d82c;p=jalview.git diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 8e7141b..3bfc7db 100755 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -175,8 +175,6 @@ public class SeqPanel extends JPanel y %= chunkHeight; seq = y / av.getCharHeight() + av.getStartSeq(); - // chunkHeight = (da.getHeight() + 2)*charHeight; - // startx += chunkWidth; } else { @@ -250,7 +248,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 +360,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 +384,7 @@ public class SeqPanel extends JPanel if(stretchGroup == null) { stretchGroup = av.alignment.findGroup( sequence ); - if(res>stretchGroup.getStartRes() && resstretchGroup.getStartRes() && resav.alignment.getWidth()-2) + res = av.alignment.getWidth()-2; + + if(stretchGroup.getEndRes()==res) // Edit end res position of selected group changeEndRes = true; @@ -558,7 +546,7 @@ public class SeqPanel extends JPanel else if (y < oldSeq) dragDirection = -1; - while (y != oldSeq && oldSeq>0) + while (y != oldSeq && oldSeq>0 && y