From: gmungoc Date: Mon, 12 Jun 2017 16:11:27 +0000 (+0100) Subject: JAL-2577 mirror select/hide by annotation in split frame applet, and on X-Git-Tag: Release_2_10_3b1~202^2 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=12d4dfa00a5e93ae1de1d8409c6d5ca2bc8af13f JAL-2577 mirror select/hide by annotation in split frame applet, and on Cancel --- 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