From 7a449f227cd532d24c214521cb7657420fdba694 Mon Sep 17 00:00:00 2001 From: kiramt Date: Fri, 2 Jun 2017 09:59:22 +0100 Subject: [PATCH] JAL-2578 Moved hidden columns reveal to before selection adjustment --- src/jalview/gui/AnnotationColumnChooser.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/AnnotationColumnChooser.java b/src/jalview/gui/AnnotationColumnChooser.java index 96299e7..7dafa7d 100644 --- a/src/jalview/gui/AnnotationColumnChooser.java +++ b/src/jalview/gui/AnnotationColumnChooser.java @@ -113,7 +113,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements setOldHiddenColumns(av.getAlignment().getHiddenColumns()); adjusting = true; - setAnnotations(new JComboBox(getAnnotationItems(false))); + setAnnotations(new JComboBox<>(getAnnotationItems(false))); populateThresholdComboBox(threshold); AnnotationColumnChooser lastChooser = av .getAnnotationColumnSelectionState(); @@ -394,10 +394,13 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements } } + // show hidden columns here, before changing the column selection in + // filterAnnotations, because showing hidden columns has the side effect of + // adding them to the selection + av.showAllHiddenColumns(); av.getColumnSelection().filterAnnotations( getCurrentAnnotation().annotations, filterParams); - av.showAllHiddenColumns(); if (getActionOption() == ACTION_OPTION_HIDE) { av.hideSelectedColumns(); -- 1.7.10.2