JAL-3840 don’t update the modal residue count for gaps
[jalview.git] / 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;
   }