Fix for Finn Drablos bug. Must use equals for comparing strings
authoramwaterhouse <Andrew Waterhouse>
Thu, 16 Mar 2006 17:25:35 +0000 (17:25 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 16 Mar 2006 17:25:35 +0000 (17:25 +0000)
src/jalview/appletgui/AnnotationPanel.java
src/jalview/gui/AnnotationPanel.java

index 92ee3a2..ad2e6f0 100755 (executable)
@@ -389,8 +389,8 @@ public class AnnotationPanel
                           y + iconOffset + 3);\r
                   }\r
                   else if (((row.annotations[j - 1] == null) ||\r
-                          (row.annotations[j].displayCharacter != row.annotations[j -\r
-                          1].displayCharacter)))\r
+                          (!row.annotations[j].displayCharacter.equals(\r
+                           row.annotations[j - 1].displayCharacter))))\r
                   {\r
                       g.drawString(row.annotations[j].displayCharacter, x+charOffset,\r
                           y + iconOffset + 3);\r
index e962bdf..ab6d395 100755 (executable)
@@ -711,9 +711,10 @@ public class AnnotationPanel extends JPanel implements MouseListener,
                         g.drawString(row.annotations[column].displayCharacter, x+charOffset,\r
                             y + iconOffset + 3);\r
                     }\r
-                    else if (((row.annotations[column - 1] == null) ||\r
-                            (row.annotations[column].displayCharacter != row.annotations[column -\r
-                            1].displayCharacter)))\r
+                    else if (((row.annotations[column - 1] == null)\r
+                              ||\r
+                            (!row.annotations[column].displayCharacter.equals(\r
+                             row.annotations[column - 1].displayCharacter))))\r
                     {\r
                         g.drawString(row.annotations[column].displayCharacter, x+charOffset,\r
                             y + iconOffset + 3);\r