import jalview.io.FormatAdapter;
import jalview.util.Comparison;
import jalview.util.MessageManager;
+import jalview.util.ParseHtmlBodyAndLinks;
import jalview.util.Platform;
/**
}
SequenceI lastSeqRef = null;
String lastLabel = null;
+ String lastDescription = null;
AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation();
int fontHeight = g != null ? g.getFont().getSize()
: fm.getFont().getSize();
offset += fm.getDescent();
}
String label = aa[i].label;
+ ParseHtmlBodyAndLinks phbDecription = new ParseHtmlBodyAndLinks(
+ aa[i].description, true, "\n");
+ String description = phbDecription.getNonHtmlContent();
boolean vertBar = false;
- if ((lastLabel != null && lastLabel.equals(label)))
+ if (lastLabel != null && lastLabel.equals(label) &&
+ lastDescription != null && lastDescription.equals(description))
{
- label = aa[i].description;
+ //JAL-4427
+ label = aa[i].label; // No change in label
+ }
+ else if (lastLabel != null && lastLabel.equals(label))
+ {
+ //JAL-4427
+ if(!(lastDescription != null && lastDescription.equals(description))
+ && (aa[i].sequenceRef == lastSeqRef)) {
+ label = description;
+ lastDescription = description;
+ }
}
else
{
{
lastLabel = label;
// next label is the same as this label
- label = aa[i].description;
+ //JAL-4427
+ if(!(lastDescription != null && lastDescription.equals(description))) {
+ if(aa[nexAA].sequenceRef == aa[i].sequenceRef) {
+ label = description;
+ }
+ lastDescription = description;
+ }
}
else
{
lastLabel = label;
+ lastDescription = description;
}
}
if (aa[i].sequenceRef != null)