// Group editing\r
if (evt.isAltDown() || evt.isControlDown())\r
{\r
- SequenceGroup sg = av.getAlignment().findGroup(startseq);\r
+ SequenceGroup sg = av.getSelectionGroup();\r
+ if(sg==null)\r
+ av.getAlignment().findGroup(startseq);\r
if (sg != null)\r
{\r
boolean deleteAllowed = false;\r
\r
void updateConservation(int i)\r
{\r
- /* Alignment al = (Alignment) av.getAlignment();\r
- SequenceGroup sg = av.alignment.findGroup( al.getSequenceAt(i));\r
- if(sg==null || !(sg.cs instanceof ConservationColourScheme))\r
- return;\r
-\r
- Conservation c = sg.getConservation();\r
-\r
- c = new Conservation("All", al.cons,\r
- ResidueProperties.propHash, 3, sg.sequences, 0,\r
- al.getWidth());\r
- c.calculate();\r
- c.verdict(false, 100);\r
- sg.setConservation(c);\r
- ConservationColourScheme ccs = (ConservationColourScheme)sg.cs;\r
- ccs.conserve = c;*/\r
+ av.updateConservation();\r
+ av.updateConsensus();\r
}\r
\r
//////////////////////////////////////////\r
if(stretchGroup == null)\r
{\r
stretchGroup = av.alignment.findGroup( sequence );\r
- if(res>stretchGroup.getStartRes() && res<stretchGroup.getEndRes())\r
+ if(stretchGroup!=null && res>stretchGroup.getStartRes() && res<stretchGroup.getEndRes())\r
av.setSelectionGroup(stretchGroup);\r
else\r
stretchGroup = null;\r