From 55895fe0142a04bd24d3166314a48b3282314a34 Mon Sep 17 00:00:00 2001 From: James Procter Date: Tue, 17 Oct 2023 10:53:13 +0100 Subject: [PATCH] JAL-4089 selected columns are reported in absolute column numbers, not visible columns --- src/jalview/datamodel/ColumnSelection.java | 8 +++++--- src/jalview/structures/models/AAStructureBindingModel.java | 7 ------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/jalview/datamodel/ColumnSelection.java b/src/jalview/datamodel/ColumnSelection.java index 4a38ec0..b427739 100644 --- a/src/jalview/datamodel/ColumnSelection.java +++ b/src/jalview/datamodel/ColumnSelection.java @@ -340,10 +340,12 @@ public class ColumnSelection /** * Returns a read-only view of the (possibly empty) list of selected columns + * (base 1) *

- * The list contains no duplicates but is not necessarily ordered. It also may - * include columns hidden from the current view. To modify (for example sort) - * the list, you should first make a copy. + * The list contains no duplicates but is not necessarily ordered. Columns are + * reported in alignment coordinates (base 1), so may also include columns + * hidden from the current view. To modify (for example sort) the list, you + * should first make a copy. *

* The list is not thread-safe: iterating over it could result in * ConcurrentModificationException if it is modified by another thread. diff --git a/src/jalview/structures/models/AAStructureBindingModel.java b/src/jalview/structures/models/AAStructureBindingModel.java index 4b11494..dcedafa 100644 --- a/src/jalview/structures/models/AAStructureBindingModel.java +++ b/src/jalview/structures/models/AAStructureBindingModel.java @@ -884,14 +884,7 @@ public abstract class AAStructureBindingModel { for (int s : cs.getSelected()) { - if (hiddenCols == null) - { matched.set(s); - } - else - { - matched.set(hiddenCols.visibleToAbsoluteColumn(s)); - } } } else -- 1.7.10.2