From: James Procter Date: Wed, 15 Mar 2023 10:56:34 +0000 (+0000) Subject: JAL-2349 don’t clobber existing label/description for an annotation when associating... X-Git-Tag: Release_2_11_3_0~15^2^2~16 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=9f47bfe02c59548bb1de4f373f1dcf9aa0e0ffe9;p=jalview.git JAL-2349 don’t clobber existing label/description for an annotation when associating it with a contact matrix --- diff --git a/src/jalview/datamodel/ContactMapHolder.java b/src/jalview/datamodel/ContactMapHolder.java index a555a17..296feaf 100644 --- a/src/jalview/datamodel/ContactMapHolder.java +++ b/src/jalview/datamodel/ContactMapHolder.java @@ -72,8 +72,15 @@ public class ContactMapHolder implements ContactMapHolderI annotation.editable = false; annotation.graph = AlignmentAnnotation.CONTACT_MAP; annotation.calcId = cm.getType(); - annotation.label = cm.getAnnotLabel(); - annotation.description = cm.getAnnotDescr(); + if (annotation.label == null || "".equals(annotation.label)) + { + annotation.label = cm.getAnnotLabel(); + + } + if (annotation.description == null || "".equals(annotation.description)) + { + annotation.description = cm.getAnnotDescr(); + } contactmaps.put(annotation.annotationId, cm); } }