JAL-3567 adjust layout of linked feature report, unit test
[jalview.git] / src / jalview / datamodel / SequenceFeature.java
index 7a539d0..01574e1 100755 (executable)
@@ -608,6 +608,8 @@ public class SequenceFeature implements FeatureLocationI
     sb.append(String.format(ROW_DATA, "Location", name,
             begin == end ? begin
                     : begin + (isContactFeature() ? ":" : "-") + end));
+
+    String consequence = "";
     if (mf != null)
     {
       int[] beginRange = mf.getMappedPositions(begin, begin);
@@ -619,8 +621,7 @@ public class SequenceFeature implements FeatureLocationI
               : from + (isContactFeature() ? ":" : "-") + to));
       if (mf.isFromCds())
       {
-        sb.append(String.format(ROW_DATA, "Consequence",
-                mf.findProteinVariants(this), "<i>imputed by Jalview</i>"));
+        consequence = mf.findProteinVariants(this);
       }
     }
     sb.append(String.format(ROW_DATA, "Type", type, ""));
@@ -635,6 +636,12 @@ public class SequenceFeature implements FeatureLocationI
       sb.append(String.format(ROW_DATA, "Group", featureGroup, ""));
     }
 
+    if (!consequence.isEmpty())
+    {
+      sb.append(String.format(ROW_DATA, "Consequence",
+              "<i>Imputed by Jalview</i>", consequence));
+    }
+
     if (otherDetails != null)
     {
       TreeMap<String, Object> ordered = new TreeMap<>(