From: Jim Procter Date: Thu, 12 Feb 2015 17:05:17 +0000 (+0000) Subject: Merge branch 'improvement/JAL-1350_makegroups_markedcolumns' into merge/JAL-845_JAL... X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=40bea597e1aac3d7ff0a381d310d90ed10a81ac4;p=jalview.git Merge branch 'improvement/JAL-1350_makegroups_markedcolumns' into merge/JAL-845_JAL-1640 Conflicts: src/jalview/datamodel/SequenceGroup.java --- 40bea597e1aac3d7ff0a381d310d90ed10a81ac4 diff --cc src/jalview/datamodel/SequenceGroup.java index 9c046c6,c6b9cbd..8404a8c --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@@ -159,10 -159,8 +159,7 @@@ public class SequenceGroup implements A { if (seqsel != null) { - for (SequenceI seq : seqsel.sequences) - { - sequences.addElement(seq); - } - sequences = new ArrayList(); + sequences.addAll(seqsel.sequences); if (seqsel.groupName != null) { groupName = new String(seqsel.groupName); @@@ -985,26 -982,14 +981,17 @@@ { SequenceGroup sgroup = new SequenceGroup(this); SequenceI[] insect = getSequencesInOrder(alignment); - sgroup.sequences = new Vector(); - if (insect != null) + sgroup.sequences = new ArrayList(); + for (int s = 0; insect != null && s < insect.length; s++) { - if (map == null || map.containsKey(insect[s])) + for (SequenceI seq : insect) { - sgroup.sequences.add(insect[s]); + if (map == null || map.containsKey(seq)) + { - sgroup.sequences.addElement(seq); - } ++ sgroup.sequences.add(insect[s]); ++ } } } - // Enumeration en =getSequences(hashtable).elements(); - // while (en.hasMoreElements()) - // { - // SequenceI elem = (SequenceI) en.nextElement(); - // if (alignment.getSequences().contains(elem)) - // { - // sgroup.addSequence(elem, false); - // } - // } return sgroup; }