From 56a02618a557711eed7879f72ac916ffb40c0a3f Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 9 Nov 2018 15:01:54 +0000 Subject: [PATCH] JAL-3127 polished setColor after review --- src/jalview/gui/TreeCanvas.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/jalview/gui/TreeCanvas.java b/src/jalview/gui/TreeCanvas.java index 85ee4bf..67ddbd1 100755 --- a/src/jalview/gui/TreeCanvas.java +++ b/src/jalview/gui/TreeCanvas.java @@ -514,21 +514,18 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, node.color = c; if (node.element() instanceof SequenceI) { + final SequenceI seq = (SequenceI) node.element(); 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); - setColor((SequenceNode) node.right(), c); - } + setColor((SequenceNode) node.left(), c); + setColor((SequenceNode) node.right(), c); } /** -- 1.7.10.2