apply version 2.7 copyright
[jalview.git] / src / jalview / gui / TreeCanvas.java
index 9022182..02be03f 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
  * 
  * This file is part of Jalview.
  * 
@@ -905,9 +905,12 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
                   .getWidth(), ColourSchemeProperty.getColourName(av
                   .getGlobalColourScheme()));
         }
-
-        cs.setThreshold(av.getGlobalColourScheme().getThreshold(),
-                av.getIgnoreGapsConsensus());
+        // cs is null if shading is an annotationColourGradient
+        if (cs!=null)
+        {
+          cs.setThreshold(av.getGlobalColourScheme().getThreshold(),
+                  av.getIgnoreGapsConsensus());
+        }
       }
 
       SequenceGroup sg = new SequenceGroup(sequences, null, cs, true, true,
@@ -936,6 +939,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
     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
     }
 
   }