From 86bf99474fd78966716a9d82ff925e4ec7c0663b Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 26 Apr 2007 17:11:27 +0000 Subject: [PATCH] score is a double, fix bugs for score only annotation not being associated with sequences --- src/jalview/datamodel/AlignmentAnnotation.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index acb02b1..20a3633 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -57,7 +57,7 @@ public class AlignmentAnnotation /** * Score associated with label and description. */ - public float score= Float.NaN; + public double score= Double.NaN; /** * flag indicating if annotation has a score. */ @@ -483,13 +483,13 @@ Loading... { return; } + sequenceRef=seqRef; if (annotations==null) { return; } sequenceMapping = new java.util.Hashtable(); - sequenceRef = seqRef; int seqPos; for (int i = 0; i < annotations.length; i++) @@ -616,7 +616,7 @@ Loading... /** * @return the score */ - public float getScore() + public double getScore() { return score; } @@ -624,8 +624,9 @@ Loading... /** * @param score the score to set */ - public void setScore(float score) + public void setScore(double score) { + hasScore=true; this.score = score; } /** @@ -634,6 +635,6 @@ Loading... */ public boolean hasScore() { - return hasScore; + return hasScore || !Double.isNaN(score); } } -- 1.7.10.2