From d4ede6b61d4abab78200f334d8df07879dfe6741 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 24 Jan 2005 17:27:00 +0000 Subject: [PATCH] returns color.white if the underlying colourscheme is null --- src/jalview/schemes/ConservationColourScheme.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/jalview/schemes/ConservationColourScheme.java b/src/jalview/schemes/ConservationColourScheme.java index ab5a808..f6726bb 100755 --- a/src/jalview/schemes/ConservationColourScheme.java +++ b/src/jalview/schemes/ConservationColourScheme.java @@ -83,12 +83,9 @@ public class ConservationColourScheme extends ResidueColourScheme { int tmp = 10; int t = 0; - try - {t=Integer.parseInt(conserve.getConsSequence().getSequence().substring(i,i+1));} - catch(NumberFormatException ex){ - System.out.println("fix this bug, conserveColourScheme"); - t=0; - } + if( !jalview.util.Comparison.isGap( conserve.getConsSequence().getSequence().charAt(i) )) + t=Integer.parseInt(conserve.getConsSequence().getSequence().substring(i,i+1)); + c = findColour(null,s,i); while (tmp >= t) { @@ -105,7 +102,10 @@ public class ConservationColourScheme extends ResidueColourScheme { } public Color findColour(DrawableSequence seq, String s, int j) { - return cs.findColour( s, -1, null); + if(cs!=null) + return cs.findColour( s, -1, null); + else + return Color.white; } public boolean fullConservation(int j) { String tmp = conserve.getConsSequence().getSequence().substring(j,j+1); -- 1.7.10.2