From a1e7f1dabd6d59cd45d76a4d428781d766c9dae3 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 18 May 2017 15:56:25 +0100 Subject: [PATCH] JAL-2490 lookup sequence features for "labelClass" --- src/jalview/gui/TreePanel.java | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) 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(); } } } -- 1.7.10.2