Merge branch 'develop' into bug/JAL-2346annotationChoice
[jalview.git] / src / jalview / gui / AnnotationColourChooser.java
index d24409f..33f7ad0 100644 (file)
@@ -78,9 +78,9 @@ public class AnnotationColourChooser extends AnnotationRowFilter
       oldgroupColours = new Hashtable<SequenceGroup, ColourSchemeI>();
       for (SequenceGroup sg : ap.av.getAlignment().getGroups())
       {
-        if (sg.cs != null)
+        if (sg.getColourScheme() != null)
         {
-          oldgroupColours.put(sg, sg.cs);
+          oldgroupColours.put(sg, sg.getColourScheme());
         }
       }
     }
@@ -320,7 +320,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter
 
       for (SequenceGroup sg : ap.av.getAlignment().getGroups())
       {
-        sg.cs = oldgroupColours.get(sg);
+        sg.setColourScheme(oldgroupColours.get(sg));
       }
     }
   }
@@ -450,16 +450,16 @@ public class AnnotationColourChooser extends AnnotationRowFilter
   
         if (currentColours.isSelected())
         {
-          sg.cs = new AnnotationColourGradient(currentAnn, sg.cs,
-                  selectedThresholdOption);
+          sg.setColourScheme(new AnnotationColourGradient(currentAnn, sg
+                  .getColourScheme(), selectedThresholdOption));
           ((AnnotationColourGradient) sg.cs).setSeqAssociated(seqAssociated
                   .isSelected());
         }
         else
         {
-          sg.cs = new AnnotationColourGradient(currentAnn,
+          sg.setColourScheme(new AnnotationColourGradient(currentAnn,
                   minColour.getBackground(), maxColour.getBackground(),
-                  selectedThresholdOption);
+                  selectedThresholdOption));
           ((AnnotationColourGradient) sg.cs).setSeqAssociated(seqAssociated
                   .isSelected());
         }