From 12d4dfa00a5e93ae1de1d8409c6d5ca2bc8af13f Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 12 Jun 2017 17:11:27 +0100 Subject: [PATCH] JAL-2577 mirror select/hide by annotation in split frame applet, and on Cancel --- src/jalview/appletgui/AnnotationColumnChooser.java | 11 ++++++++--- src/jalview/gui/AnnotationColumnChooser.java | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/jalview/appletgui/AnnotationColumnChooser.java b/src/jalview/appletgui/AnnotationColumnChooser.java index 60775d3..22978c3 100644 --- a/src/jalview/appletgui/AnnotationColumnChooser.java +++ b/src/jalview/appletgui/AnnotationColumnChooser.java @@ -310,6 +310,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements } av.getAlignment().setHiddenColumns(oldHidden); } + av.sendSelection(); ap.paintAlignment(true); } @@ -428,8 +429,8 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements } adjusting = true; - float range = getCurrentAnnotation().graphMax * 1000 - - getCurrentAnnotation().graphMin * 1000; + // float range = getCurrentAnnotation().graphMax * 1000 + // - getCurrentAnnotation().graphMin * 1000; slider.setMinimum((int) (getCurrentAnnotation().graphMin * 1000)); slider.setMaximum((int) (getCurrentAnnotation().graphMax * 1000)); @@ -504,10 +505,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(); @@ -515,6 +519,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements filterParams = null; av.setAnnotationColumnSelectionState(this); + av.sendSelection(); ap.paintAlignment(true); } diff --git a/src/jalview/gui/AnnotationColumnChooser.java b/src/jalview/gui/AnnotationColumnChooser.java index a95d0c0..f81455e 100644 --- a/src/jalview/gui/AnnotationColumnChooser.java +++ b/src/jalview/gui/AnnotationColumnChooser.java @@ -256,9 +256,9 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements } av.getAlignment().setHiddenColumns(oldHidden); } + av.sendSelection(); ap.paintAlignment(true); } - } @Override -- 1.7.10.2