From: kiramt Date: Fri, 2 Jun 2017 08:59:22 +0000 (+0100) Subject: JAL-2578 Moved hidden columns reveal to before selection adjustment X-Git-Tag: Release_2_10_2~3^2~41^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7a449f227cd532d24c214521cb7657420fdba694;p=jalview.git JAL-2578 Moved hidden columns reveal to before selection adjustment --- 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();