From: kiramt Date: Tue, 26 Sep 2017 13:04:36 +0000 (+0100) Subject: JAL-2674 more List -> HiddenColumns copy changes X-Git-Tag: Release_2_10_4~55^2~1^2~105 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=15f319be6f7781efdca23314ec9a13595e938eb9;p=jalview.git JAL-2674 more List -> HiddenColumns copy changes --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index d843c7f..4e23f2b 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -2259,11 +2259,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, if (Desktop.jalviewClipboard != null && Desktop.jalviewClipboard[2] != null) { - List hc = (List) Desktop.jalviewClipboard[2]; - for (int region[] : hc) - { - af.viewport.hideColumns(region[0], region[1]); - } + HiddenColumns hc = (HiddenColumns) Desktop.jalviewClipboard[2]; + af.viewport.setHiddenColumns(hc); } // >>>This is a fix for the moment, until a better solution is diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index d07cae2..76c711f 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -24,6 +24,7 @@ import jalview.analysis.AlignmentUtils; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.Annotation; +import jalview.datamodel.HiddenColumns; import jalview.datamodel.Sequence; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; @@ -49,7 +50,6 @@ import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.geom.AffineTransform; import java.awt.image.BufferedImage; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.regex.Pattern; @@ -962,12 +962,12 @@ public class AnnotationLabels extends JPanel Toolkit.getDefaultToolkit().getSystemClipboard() .setContents(new StringSelection(output), Desktop.instance); - ArrayList hiddenColumns = null; + HiddenColumns hiddenColumns = null; if (av.hasHiddenColumns()) { - hiddenColumns = av.getAlignment().getHiddenColumns() - .getHiddenColumnsCopy(); + hiddenColumns = new HiddenColumns( + av.getAlignment().getHiddenColumns()); } Desktop.jalviewClipboard = new Object[] { seqs, ds, // what is the dataset