From 813e55dd7e4637855940056d6559df4d03d4fae5 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 26 Nov 2014 14:47:54 +0000 Subject: [PATCH] JAL-1578 fix logic for showing score when no description present --- src/jalview/gui/AnnotationLabels.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index 0a3423e..6e8417f 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -493,14 +493,14 @@ public class AnnotationLabels extends JPanel implements MouseListener, { // begin the tooltip's html fragment desc.append(""); + if (aa.hasScore()) + { + // TODO: limit precision of score to avoid noise from imprecise + // doubles + // (64.7 becomes 64.7+/some tiny value). + desc.append(" Score: " + aa.score); + } } - if (aa.hasScore()) - { - // TODO: limit precision of score to avoid noise from imprecise doubles - // (64.7 becomes 64.7+/some tiny value). - desc.append(" Score: " + aa.score); - } - if (desc.length() > 6) { desc.append(""); @@ -511,7 +511,6 @@ public class AnnotationLabels extends JPanel implements MouseListener, this.setToolTipText(null); } } - } /** -- 1.7.10.2