JAL-3840 don’t update the modal residue count for gaps patch/JAL-3840_2_11_1_4
authorJim Procter <jprocter@issues.jalview.org>
Wed, 9 Jun 2021 15:53:09 +0000 (16:53 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Wed, 9 Jun 2021 15:53:09 +0000 (16:53 +0100)
src/jalview/datamodel/ResidueCount.java

index 6b52166..efab97c 100644 (file)
@@ -212,7 +212,12 @@ public class ResidueCount
         counts[offset] = (short) ++newValue;
       }
     }
-    maxCount = Math.max(maxCount, newValue);
+
+    if (offset!=GAP_COUNT)
+    {
+      // update modal residue count
+      maxCount = Math.max(maxCount, newValue);
+    }
     return newValue;
   }