Merge branch 'features/JAL-4134_treeviewerforcolumns' into develop
[jalview.git] / src / jalview / datamodel / ContactMapHolder.java
index 5849374..296feaf 100644 (file)
@@ -44,7 +44,7 @@ public class ContactMapHolder implements ContactMapHolderI
     aa.graphMin = cm.getMin();
     aa.graphMax = cm.getMax();
     aa.editable = false;
-    aa.calcId=cm.getType();
+    aa.calcId = cm.getType();
 
     contactmaps.put(aa.annotationId, cm);
     // TODO: contact matrices could be intra or inter - more than one refseq
@@ -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);
   }
 }