Merge branch 'develop' into features/JAL-1705_ensembl
[jalview.git] / src / jalview / schemes / RNAHelicesColourChooser.java
index ee9792a..1a13bbe 100644 (file)
  */
 package jalview.schemes;
 
-import java.util.*;
-import java.awt.event.*;
-
 import jalview.api.AlignViewportI;
 import jalview.api.AlignmentViewPanel;
-import jalview.datamodel.*;
-import jalview.schemes.*;
+import jalview.datamodel.SequenceGroup;
+
+import java.awt.event.ActionEvent;
+import java.util.Hashtable;
+import java.util.Vector;
 
 /**
  * Helps generate the colors for RNA secondary structure. Future: add option to
@@ -81,9 +81,13 @@ public class RNAHelicesColourChooser
     {
       String label = av.getAlignment().getAlignmentAnnotation()[i].label;
       if (!list.contains(label))
+      {
         list.addElement(label);
+      }
       else
+      {
         list.addElement(label + "_" + (index++));
+      }
     }
 
     adjusting = false;
@@ -105,21 +109,7 @@ public class RNAHelicesColourChooser
 
     av.setGlobalColourScheme(rhc);
 
-    if (av.getAlignment().getGroups() != null)
-    {
-      for (SequenceGroup sg : ap.getAlignment().getGroups())
-      {
-        if (sg.cs == null)
-        {
-          continue;
-        }
-
-        sg.cs = new RNAHelicesColour(sg);
-
-      }
-    }
-
-    ap.paintAlignment(false);
+    ap.paintAlignment(true);
   }
 
   void reset()