From: jprocter Date: Tue, 8 Jun 2010 14:27:25 +0000 (+0000) Subject: trim hidden regions outside selection when copying selected region to clipboard ... X-Git-Tag: Release_2_5_1~21 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=6ef8b014737c1dac4f2e566e27cf4b34b68af9c0;p=jalview.git trim hidden regions outside selection when copying selected region to clipboard * JAL-573 --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 22647a3..0e607c7 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -1530,15 +1530,17 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, if (viewport.hasHiddenColumns) { hiddenColumns = new Vector(); - int hiddenOffset = viewport.getSelectionGroup().getStartRes(); + int hiddenOffset = viewport.getSelectionGroup().getStartRes(),hiddenCutoff=viewport.getSelectionGroup().getEndRes(); for (int i = 0; i < viewport.getColumnSelection().getHiddenColumns() .size(); i++) { int[] region = (int[]) viewport.getColumnSelection() .getHiddenColumns().elementAt(i); - - hiddenColumns.addElement(new int[] + if (region[0]>=hiddenOffset && region[1]<=hiddenCutoff) + { + hiddenColumns.addElement(new int[] { region[0] - hiddenOffset, region[1] - hiddenOffset }); + } } }