From: jprocter Date: Mon, 9 Nov 2009 17:03:18 +0000 (+0000) Subject: no Vector(Vector) copy constructor in 1.2 X-Git-Tag: Release_2_5~156 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4e892da7333869ad8b26d75b25f2c87352ca8c7e;p=jalview.git no Vector(Vector) copy constructor in 1.2 --- diff --git a/src/jalview/datamodel/ColumnSelection.java b/src/jalview/datamodel/ColumnSelection.java index afa2e07..5c1707f 100644 --- a/src/jalview/datamodel/ColumnSelection.java +++ b/src/jalview/datamodel/ColumnSelection.java @@ -1086,6 +1086,7 @@ public class ColumnSelection */ public void setElementsFrom(ColumnSelection colsel) { + selected = new Vector(); if (colsel.selected != null && colsel.selected.size() > 0) { if (hiddenColumns!=null && hiddenColumns.size()>0) @@ -1094,13 +1095,13 @@ public class ColumnSelection selected = new Vector(); addElementsFrom(colsel); } else { - // be quick - selected = new Vector(colsel.selected); + // add everything regardless + Enumeration en = colsel.selected.elements(); + while (en.hasMoreElements()) + { + selected.addElement(en.nextElement()); + } } } - else - { - selected = new Vector(); - } } }