From: gmungoc Date: Wed, 28 Jun 2017 14:16:17 +0000 (+0100) Subject: Merge branch 'bug/JAL-2600resizeflicker' into develop X-Git-Tag: Release_2_10_3b1~183^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=62fa3114eac2a91b0d944efae2690ba59c9bec1c;hp=d738273bebedaea35a9e4a5acbe5e681f9fbae67;p=jalview.git Merge branch 'bug/JAL-2600resizeflicker' into develop --- diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 86e1144..288f261 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -34,6 +34,7 @@ import jalview.commands.CommandI; import jalview.datamodel.AlignedCodonFrame; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentI; +import jalview.datamodel.Annotation; import jalview.datamodel.ColumnSelection; import jalview.datamodel.HiddenColumns; import jalview.datamodel.PDBEntry; @@ -330,15 +331,18 @@ public class AlignViewport extends AlignmentViewport implements StringBuffer seqs = new StringBuffer(); 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(description.charAt(1)); } else { - seqs.append(consensus.annotations[i].displayCharacter); + seqs.append(annotation.displayCharacter); } } }