From: gmungoc Date: Thu, 18 May 2017 14:56:25 +0000 (+0100) Subject: JAL-2490 lookup sequence features for "labelClass" X-Git-Tag: Release_2_10_3b1~263 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a1e7f1dabd6d59cd45d76a4d428781d766c9dae3;p=jalview.git JAL-2490 lookup sequence features for "labelClass" --- diff --git a/src/jalview/gui/TreePanel.java b/src/jalview/gui/TreePanel.java index 35998eb..32c5702 100755 --- a/src/jalview/gui/TreePanel.java +++ b/src/jalview/gui/TreePanel.java @@ -789,19 +789,17 @@ public class TreePanel extends GTreePanel } if (newname == null) { - SequenceFeature sf[] = sq.getSequenceFeatures(); - for (int i = 0; sf != null && i < sf.length; i++) + List features = sq.getFeatures() + .getPositionalFeatures(labelClass); + for (SequenceFeature feature : features) { - if (sf[i].getType().equals(labelClass)) + if (newname == null) + { + newname = feature.getDescription(); + } + else { - if (newname == null) - { - newname = new String(sf[i].getDescription()); - } - else - { - newname = newname + "; " + sf[i].getDescription(); - } + newname = newname + "; " + feature.getDescription(); } } }