From 6f153aac5d457ab69f994d71df1cf30b69d07af5 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 15 Aug 2018 11:01:27 +0100 Subject: [PATCH] JAL-3080 remove tree partition if no groups created --- src/jalview/gui/TreeCanvas.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/TreeCanvas.java b/src/jalview/gui/TreeCanvas.java index 7dc1a99..fa30e13 100755 --- a/src/jalview/gui/TreeCanvas.java +++ b/src/jalview/gui/TreeCanvas.java @@ -962,6 +962,15 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, } } colourGroups(groups); + + /* + * clear partition (don't show vertical line) if + * it is to the right of all nodes + */ + if (groups.isEmpty()) + { + threshold = 0f; + } } PaintRefresher.Refresh(tp, ap.av.getSequenceSetId()); @@ -981,7 +990,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, Vector l = tree.findLeaves(groups.get(i)); - Vector sequences = new Vector(); + Vector sequences = new Vector<>(); for (int j = 0; j < l.size(); j++) { -- 1.7.10.2