From 9f47bfe02c59548bb1de4f373f1dcf9aa0e0ffe9 Mon Sep 17 00:00:00 2001 From: James Procter Date: Wed, 15 Mar 2023 10:56:34 +0000 Subject: [PATCH] =?utf8?q?JAL-2349=20=20don=E2=80=99t=20clobber=20existing=20?= =?utf8?q?label/description=20for=20an=20annotation=20when=20associating=20i?= =?utf8?q?t=20with=20a=20contact=20matrix?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/jalview/datamodel/ContactMapHolder.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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); } } -- 1.7.10.2