From a9c0ba9fb445e38918d3e20fb9eba72eb641b4ed Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 6 Sep 2017 11:55:57 +0100 Subject: [PATCH] JAL-2724 patch to fix ClassCastException - method should be refactored and tests written as part of JAL-2725 --- src/jalview/gui/AnnotationColourChooser.java | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) 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; -- 1.7.10.2