From: gmungoc Date: Fri, 16 Dec 2016 15:31:53 +0000 (+0000) Subject: JAL-2346 ensure view updates when annotation options are rebuilt X-Git-Tag: Release_2_10_3b1~336^2~2^2~1^2~2^2~7 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4ea44eaccf82b15dafb8dd53f5c71de5e9d0d551;p=jalview.git JAL-2346 ensure view updates when annotation options are rebuilt --- diff --git a/src/jalview/gui/AnnotationRowFilter.java b/src/jalview/gui/AnnotationRowFilter.java index 128b99c..7bf8721 100644 --- a/src/jalview/gui/AnnotationRowFilter.java +++ b/src/jalview/gui/AnnotationRowFilter.java @@ -88,8 +88,6 @@ public abstract class AnnotationRowFilter extends JPanel */ private Map annotationLabels; - private boolean enableSeqAss = false; - private AlignmentAnnotation currentAnnotation; /** @@ -176,6 +174,7 @@ public abstract class AnnotationRowFilter extends JPanel Vector list = new Vector(); int index = 1; int[] anmap = new int[av.getAlignment().getAlignmentAnnotation().length]; + seqAssociated.setEnabled(false); for (int i = 0; i < av.getAlignment().getAlignmentAnnotation().length; i++) { AlignmentAnnotation annotation = av.getAlignment() @@ -189,7 +188,7 @@ public abstract class AnnotationRowFilter extends JPanel } else { - enableSeqAss = true; + seqAssociated.setEnabled(true); } String label = annotation.label; // add associated sequence ID if available @@ -234,11 +233,6 @@ public abstract class AnnotationRowFilter extends JPanel return selectedThresholdItem; } - public void modelChanged() - { - seqAssociated.setEnabled(enableSeqAss); - } - public void ok_actionPerformed() { try @@ -313,7 +307,8 @@ public abstract class AnnotationRowFilter extends JPanel { adjusting = true; String cursel = (String) anns.getSelectedItem(); - boolean isvalid = false, isseqs = seqAssociated.isSelected(); + boolean isvalid = false; + boolean isseqs = seqAssociated.isSelected(); anns.removeAllItems(); for (String anitem : getAnnotationItems(seqAssociated.isSelected())) { @@ -324,7 +319,6 @@ public abstract class AnnotationRowFilter extends JPanel } anns.addItem(anitem); } - adjusting = false; if (isvalid) { anns.setSelectedItem(cursel); @@ -336,6 +330,9 @@ public abstract class AnnotationRowFilter extends JPanel anns.setSelectedIndex(0); } } + adjusting = false; + + updateView(); } protected void propagateSeqAssociatedThreshold(boolean allAnnotation,