From 4e892da7333869ad8b26d75b25f2c87352ca8c7e Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 9 Nov 2009 17:03:18 +0000 Subject: [PATCH] no Vector(Vector) copy constructor in 1.2 --- src/jalview/datamodel/ColumnSelection.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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(); - } } } -- 1.7.10.2