From 4d68dde4cec0aec2293d99dc7d00a38755fb5c06 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 30 Jun 2017 11:44:27 +0100 Subject: [PATCH] JAL-2602 same fix for applet --- src/jalview/appletgui/AlignViewport.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/jalview/appletgui/AlignViewport.java b/src/jalview/appletgui/AlignViewport.java index 73cd9e9..a894d0b 100644 --- a/src/jalview/appletgui/AlignViewport.java +++ b/src/jalview/appletgui/AlignViewport.java @@ -26,6 +26,7 @@ import jalview.api.FeatureSettingsModelI; import jalview.bin.JalviewLite; import jalview.commands.CommandI; import jalview.datamodel.AlignmentI; +import jalview.datamodel.Annotation; import jalview.datamodel.ColumnSelection; import jalview.datamodel.HiddenColumns; import jalview.datamodel.SearchResults; @@ -248,15 +249,18 @@ public class AlignViewport extends AlignmentViewport implements StringBuilder seqs = new StringBuilder(consensus.annotations.length); for (int i = 0; i < consensus.annotations.length; i++) { - if (consensus.annotations[i] != null) + Annotation annotation = consensus.annotations[i]; + if (annotation != null) { - if (consensus.annotations[i].description.charAt(0) == '[') + String description = annotation.description; + if (description != null && description.startsWith("[")) { - seqs.append(consensus.annotations[i].description.charAt(1)); + // consensus is a tie - just pick the first one + seqs.append(annotation.description.charAt(1)); } else { - seqs.append(consensus.annotations[i].displayCharacter); + seqs.append(annotation.displayCharacter); } } } -- 1.7.10.2