Merge branch 'develop' into merged_2_11_2_0_to_2_12
[jalview.git] / src / jalview / appletgui / TreeCanvas.java
index 6ee75bd..5280d84 100755 (executable)
@@ -631,7 +631,7 @@ public class TreeCanvas extends Panel
 
       Vector<SequenceNode> l = tree.findLeaves(groups.get(i));
 
-      Vector<SequenceI> sequences = new Vector<SequenceI>();
+      Vector<SequenceI> sequences = new Vector<>();
       for (int j = 0; j < l.size(); j++)
       {
         SequenceI s1 = (SequenceI) l.elementAt(j).element();
@@ -657,8 +657,9 @@ public class TreeCanvas extends Panel
         }
         else
         {
-          cs = ColourSchemeProperty.getColourScheme(sg, ColourSchemeProperty
-                  .getColourName(av.getGlobalColourScheme()));
+          cs = ColourSchemeProperty.getColourScheme(av, sg,
+                  ColourSchemeProperty
+                          .getColourName(av.getGlobalColourScheme()));
         }
         // cs is null if shading is an annotationColourGradient
         // if (cs != null)
@@ -714,8 +715,10 @@ public class TreeCanvas extends Panel
     ap.updateAnnotation();
     if (av.getCodingComplement() != null)
     {
-      ((AlignmentViewport) av.getCodingComplement()).firePropertyChange(
-              "alignment", null, ap.av.getAlignment().getSequences());
+      ((AlignmentViewport) av.getCodingComplement()).notifyAlignment();
+      // Technically, the property change is not the same because av is not necessarily getCodingComplement(), 
+      // but this is the appletgui, so I am not going to worry about it. BH
+      //.firePropertyChange("alignment", null, ap.av.getAlignment().getSequences());
     }
   }