From: gmungoc Date: Wed, 15 Aug 2018 10:01:27 +0000 (+0100) Subject: JAL-3080 remove tree partition if no groups created X-Git-Tag: Release_2_11_0~21 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=6f153aac5d457ab69f994d71df1cf30b69d07af5;p=jalview.git JAL-3080 remove tree partition if no groups created --- 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++) {