From b0964906430d7b229311b08c234881d53f78da47 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 16 Mar 2006 17:25:35 +0000 Subject: [PATCH] Fix for Finn Drablos bug. Must use equals for comparing strings --- src/jalview/appletgui/AnnotationPanel.java | 4 ++-- src/jalview/gui/AnnotationPanel.java | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index 92ee3a2..ad2e6f0 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -389,8 +389,8 @@ public class AnnotationPanel y + iconOffset + 3); } else if (((row.annotations[j - 1] == null) || - (row.annotations[j].displayCharacter != row.annotations[j - - 1].displayCharacter))) + (!row.annotations[j].displayCharacter.equals( + row.annotations[j - 1].displayCharacter)))) { g.drawString(row.annotations[j].displayCharacter, x+charOffset, y + iconOffset + 3); diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index e962bdf..ab6d395 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -711,9 +711,10 @@ public class AnnotationPanel extends JPanel implements MouseListener, g.drawString(row.annotations[column].displayCharacter, x+charOffset, y + iconOffset + 3); } - else if (((row.annotations[column - 1] == null) || - (row.annotations[column].displayCharacter != row.annotations[column - - 1].displayCharacter))) + else if (((row.annotations[column - 1] == null) + || + (!row.annotations[column].displayCharacter.equals( + row.annotations[column - 1].displayCharacter)))) { g.drawString(row.annotations[column].displayCharacter, x+charOffset, y + iconOffset + 3); -- 1.7.10.2