group recalc conserve
authoramwaterhouse <Andrew Waterhouse>
Wed, 8 Jun 2005 16:37:43 +0000 (16:37 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 8 Jun 2005 16:37:43 +0000 (16:37 +0000)
src/jalview/appletgui/SeqPanel.java

index 1720edc..9d14b26 100755 (executable)
@@ -545,7 +545,7 @@ public class SeqPanel
       SequenceGroup sg = new SequenceGroup();\r
       sg.setStartRes(res);\r
       sg.setEndRes(res);\r
-      sg.addSequence(sequence);\r
+      sg.addSequence(sequence, false);\r
       av.setSelectionGroup(sg);\r
       stretchGroup = sg;\r
 \r
@@ -600,11 +600,12 @@ public class SeqPanel
       return;\r
     }\r
 \r
+    stretchGroup.recalcConservation();\r
+\r
     if (stretchGroup.cs instanceof ClustalxColourScheme)\r
     {\r
       stretchGroup.cs = new ClustalxColourScheme(stretchGroup.sequences,\r
                                                  av.alignment.getWidth());\r
-      seqCanvas.repaint();\r
     }\r
 \r
     else if (stretchGroup.cs instanceof ConservationColourScheme)\r
@@ -614,7 +615,6 @@ public class SeqPanel
       SliderPanel.setConservationSlider(ap, stretchGroup.cs,\r
                                         stretchGroup.getName());\r
 \r
-      seqCanvas.repaint();\r
     }\r
     else\r
     {\r
@@ -629,6 +629,7 @@ public class SeqPanel
     changeEndRes = false;\r
     changeStartRes = false;\r
     stretchGroup = null;\r
+    seqCanvas.repaint();\r
     ap.repaint();\r
   }\r
 \r
@@ -705,16 +706,16 @@ public class SeqPanel
 \r
       if (stretchGroup.sequences.contains(nextSeq))\r
       {\r
-        stretchGroup.deleteSequence(seq);\r
-        stretchGroup.deleteSequence(nextSeq);\r
+        stretchGroup.deleteSequence(seq, false);\r
+        stretchGroup.deleteSequence(nextSeq, false);\r
       }\r
       else\r
       {\r
         if (seq != null)\r
         {\r
-          stretchGroup.addSequence(seq);\r
+          stretchGroup.addSequence(seq, false);\r
         }\r
-        stretchGroup.addSequence(nextSeq);\r
+        stretchGroup.addSequence(nextSeq, false);\r
       }\r
     }\r
     oldSeq = y;\r