Jalview 2.8 Source Header
[jalview.git] / src / jalview / gui / TreeCanvas.java
index 9f65511..d1003e5 100755 (executable)
@@ -1,13 +1,13 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
- * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
+ * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
  * 
  * This file is part of Jalview.
  * 
  * Jalview is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License 
  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- * 
+ *  
  * Jalview is distributed in the hope that it will be useful, but 
  * WITHOUT ANY WARRANTY; without even the implied warranty 
  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
@@ -903,18 +903,18 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
         }
         else
         {
-          cs = ColourSchemeProperty.getColour(sg, ColourSchemeProperty.getColourName(av
-                  .getGlobalColourScheme()));
+          cs = ColourSchemeProperty.getColour(sg, ColourSchemeProperty
+                  .getColourName(av.getGlobalColourScheme()));
         }
         // cs is null if shading is an annotationColourGradient
-        if (cs!=null)
+        if (cs != null)
         {
           cs.setThreshold(av.getGlobalColourScheme().getThreshold(),
                   av.getIgnoreGapsConsensus());
         }
       }
-      sg.cs=cs;
-//      sg.recalcConservation();
+      sg.cs = cs;
+      // sg.recalcConservation();
       sg.setName("JTreeGroup:" + sg.hashCode());
       sg.setIdColour(col);
       for (int a = 0; a < aps.length; a++)
@@ -931,14 +931,15 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
           sg.cs.setConservation(c);
         }
 
-        aps[a].av.getAlignment().addGroup(sg);
+        aps[a].av.getAlignment().addGroup(new SequenceGroup(sg));
       }
     }
     // notify the panel to redo any group specific stuff.
     for (int a = 0; a < aps.length; a++)
     {
       aps[a].updateAnnotation();
-      // TODO: JAL-868 - need to ensure view colour change message is broadcast to any Jmols listening in
+      // TODO: JAL-868 - need to ensure view colour change message is broadcast
+      // to any Jmols listening in
     }
 
   }