X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fgui%2FAnnotationRowFilter.java;h=166e1ade7cea64dad28db756c90f646123be1fc3;hb=01f25e260a8c336119462420a1c2a11512293b41;hp=37f1e554fc31983e48321f28434638142ff970e3;hpb=a49b953d151391cd9526a7655997c6409f20306c;p=jalview.git diff --git a/src/jalview/gui/AnnotationRowFilter.java b/src/jalview/gui/AnnotationRowFilter.java index 37f1e55..166e1ad 100644 --- a/src/jalview/gui/AnnotationRowFilter.java +++ b/src/jalview/gui/AnnotationRowFilter.java @@ -329,8 +329,8 @@ public abstract class AnnotationRowFilter extends JPanel } } - protected boolean colorAlignmContaining( - AlignmentAnnotation currentAnn, int selectedThresholdOption) + protected boolean colorAlignmContaining(AlignmentAnnotation currentAnn, + int selectedThresholdOption) { AnnotationColourGradient acg = null; @@ -347,8 +347,7 @@ public abstract class AnnotationRowFilter extends JPanel } acg.setSeqAssociated(seqAssociated.isSelected()); - if (currentAnn.graphMin == 0f - && currentAnn.graphMax == 0f) + if (currentAnn.graphMin == 0f && currentAnn.graphMax == 0f) { acg.setPredefinedColours(true); } @@ -367,23 +366,20 @@ public abstract class AnnotationRowFilter extends JPanel continue; } + AnnotationColourGradient scheme = null; if (currentColours.isSelected()) { - sg.cs = new AnnotationColourGradient(currentAnn, sg.cs, - selectedThresholdOption); - ((AnnotationColourGradient) sg.cs).setSeqAssociated(seqAssociated - .isSelected()); - + scheme = new AnnotationColourGradient(currentAnn, + sg.getColourScheme(), selectedThresholdOption); } else { - sg.cs = new AnnotationColourGradient(currentAnn, + scheme = new AnnotationColourGradient(currentAnn, minColour.getBackground(), maxColour.getBackground(), selectedThresholdOption); - ((AnnotationColourGradient) sg.cs).setSeqAssociated(seqAssociated - .isSelected()); } - + scheme.setSeqAssociated(seqAssociated.isSelected()); + sg.setColourScheme(scheme); } } return false;