X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationRowFilter.java;h=166e1ade7cea64dad28db756c90f646123be1fc3;hb=400b50efffaa43ae2c3b4d3f653bf8215c5d1edc;hp=c8bd69c8389cd2f3a97f41205b16379de47990a6;hpb=37de9310bec3501cbc6381e0c3dcb282fcaad812;p=jalview.git diff --git a/src/jalview/gui/AnnotationRowFilter.java b/src/jalview/gui/AnnotationRowFilter.java index c8bd69c..166e1ad 100644 --- a/src/jalview/gui/AnnotationRowFilter.java +++ b/src/jalview/gui/AnnotationRowFilter.java @@ -366,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;