From: gmungoc Date: Thu, 4 Feb 2016 14:02:16 +0000 (+0000) Subject: JAL-599 bug fixed so array of visible types is populated X-Git-Tag: Release_2_10_0~316^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3be19c1e81d0960f7e7f03e600abdc912890c761;p=jalview.git JAL-599 bug fixed so array of visible types is populated --- diff --git a/src/jalview/controller/AlignViewController.java b/src/jalview/controller/AlignViewController.java index 06b1e4c..6a7e222 100644 --- a/src/jalview/controller/AlignViewController.java +++ b/src/jalview/controller/AlignViewController.java @@ -333,20 +333,20 @@ public class AlignViewController implements AlignViewControllerI gps = fr == null ? null : fr.getDisplayedFeatureGroups(); if (typ != null) { - ArrayList types = new ArrayList(); - for (int i = 0; i < typ.length; i++) + List types = new ArrayList(); + for (String displayed : typ) { - if (typ[i] != null) + if (displayed != null) { - types.add(typ[i]); + types.add(displayed); } - typ = new String[types.size()]; - types.toArray(typ); } + typ = new String[types.size()]; + types.toArray(typ); } if (gps != null) { - ArrayList grps = new ArrayList(); + List grps = new ArrayList(); for (int i = 0; i < gps.length; i++) {