From: Jim Procter Date: Wed, 6 Sep 2017 10:55:57 +0000 (+0100) Subject: JAL-2724 patch to fix ClassCastException - method should be refactored and tests... X-Git-Tag: Release_2_10_2b1~6^2^2~1 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=a9c0ba9fb445e38918d3e20fb9eba72eb641b4ed JAL-2724 patch to fix ClassCastException - method should be refactored and tests written as part of JAL-2725 --- diff --git a/src/jalview/gui/AnnotationColourChooser.java b/src/jalview/gui/AnnotationColourChooser.java index f088791..8d123bb 100644 --- a/src/jalview/gui/AnnotationColourChooser.java +++ b/src/jalview/gui/AnnotationColourChooser.java @@ -456,22 +456,8 @@ public class AnnotationColourChooser extends AnnotationRowFilter { continue; } - - if (useOriginalColours.isSelected()) - { - sg.setColourScheme(new AnnotationColourGradient(currentAnn, - sg.getColourScheme(), selectedThresholdOption)); - ((AnnotationColourGradient) sg.cs) - .setSeqAssociated(seqAssociated.isSelected()); - } - else - { - sg.setColourScheme(new AnnotationColourGradient(currentAnn, - minColour.getBackground(), maxColour.getBackground(), - selectedThresholdOption)); - ((AnnotationColourGradient) sg.cs) - .setSeqAssociated(seqAssociated.isSelected()); - } + sg.setColourScheme( + acg.getInstance(sg, ap.av.getHiddenRepSequences())); } } return false;