Increment panel must call globalcolour or seqeuncegroup colour
authoramwaterhouse <Andrew Waterhouse>
Tue, 14 Dec 2004 14:51:55 +0000 (14:51 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 14 Dec 2004 14:51:55 +0000 (14:51 +0000)
src/jalview/gui/ConservationIncrementPanel.java

index 7f8fc6b..92c35f5 100755 (executable)
@@ -32,23 +32,20 @@ public class ConservationIncrementPanel extends GConservationIncrementPanel
   {\r
     java.util.Vector groups = av.getAlignment().getGroups();\r
 \r
-    if(av.getSelection().size()==0)\r
-    {\r
-      // change increment for all\r
-      for (int j = 0; j < groups.size(); j++)\r
-      {\r
-        SequenceGroup sg = ( (SequenceGroup) groups.elementAt(j));\r
-        if (sg.cs instanceof ConservationColourScheme)\r
-          ( (ConservationColourScheme) sg.cs).inc = i;\r
-      }\r
-    }\r
-    else\r
+\r
+    for (int j = 0; j < groups.size(); j++)\r
     {\r
-     SequenceGroup sg =  av.alignment.findGroup( (Sequence) av.sel.sequenceAt(0));\r
-     if (sg.cs instanceof ConservationColourScheme)\r
-          ( (ConservationColourScheme) sg.cs).inc = i;\r
+      SequenceGroup sg = ( (SequenceGroup) groups.elementAt(j));\r
+      if (sg.cs instanceof ConservationColourScheme)\r
+        ( (ConservationColourScheme) sg.cs).inc = i;\r
     }\r
 \r
+\r
+\r
+     if (av.getGlobalColourScheme() instanceof ConservationColourScheme)\r
+          ( (ConservationColourScheme) av.getGlobalColourScheme()).inc = i;\r
+\r
+\r
     ap.seqPanel.seqCanvas.paintFlag=true;\r
     ap.seqPanel.repaint();\r
 \r