JAL-3127 reinstate ability to set sequence ID colour directly by right-clicking a...
authorJim Procter <jprocter@issues.jalview.org>
Tue, 16 Oct 2018 16:20:51 +0000 (17:20 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 16 Oct 2018 16:22:11 +0000 (17:22 +0100)
src/jalview/gui/TreeCanvas.java

index 4658fc9..85ee4bf 100755 (executable)
@@ -512,7 +512,18 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
     }
 
     node.color = c;
-
+    if (node.element() instanceof SequenceI)
+    {
+      AlignmentPanel[] aps = getAssociatedPanels();
+      if (aps != null)
+      {
+        for (int a = 0; a < aps.length; a++)
+        {
+          final SequenceI seq = (SequenceI) node.element();
+          aps[a].av.setSequenceColour(seq, c);
+        }
+      }
+    }
     if ((node.left() != null) || (node.right() != null)) // TODO: internal node
     {
       setColor((SequenceNode) node.left(), c);