fix select group bug
authoramwaterhouse <Andrew Waterhouse>
Mon, 21 Mar 2005 18:47:48 +0000 (18:47 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 21 Mar 2005 18:47:48 +0000 (18:47 +0000)
src/jalview/gui/SeqPanel.java

index 55bec56..8e7141b 100755 (executable)
@@ -397,7 +397,10 @@ public class SeqPanel extends JPanel
     if(stretchGroup == null)\r
      {\r
        stretchGroup = av.alignment.findGroup( sequence );\r
-       av.setSelectionGroup( stretchGroup );\r
+       if(res>stretchGroup.getStartRes() && res<stretchGroup.getEndRes())\r
+         av.setSelectionGroup(stretchGroup);\r
+       else\r
+         stretchGroup = null;\r
      }\r
 \r
     else if(!stretchGroup.sequences.contains(sequence)\r
@@ -486,13 +489,6 @@ public class SeqPanel extends JPanel
     {\r
       ConservationColourScheme ccs = (ConservationColourScheme)stretchGroup.cs;\r
 \r
-      Conservation c = new Conservation("Group",\r
-                                        ResidueProperties.propHash, 3, stretchGroup.sequences, 0,\r
-                                        av.alignment.getWidth() );\r
-\r
-       c.calculate();\r
-       c.verdict(false, 100);\r
-       ccs = new ConservationColourScheme(c, ccs.cs);\r
 \r
        stretchGroup.cs = ccs;\r
 \r