JAL-2349 JAL-3855 off by one and daft return
authorJim Procter <j.procter@dundee.ac.uk>
Thu, 20 Oct 2022 16:14:24 +0000 (17:14 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Thu, 20 Oct 2022 16:14:24 +0000 (17:14 +0100)
src/jalview/datamodel/Alignment.java
src/jalview/renderer/ContactMapRenderer.java

index fe65829..7f97f33 100755 (executable)
@@ -2062,7 +2062,7 @@ public class Alignment implements AlignmentI, AutoCloseable
     }
     if (cl == null && _aa.sequenceRef != null)
     {
-      int spos = _aa.sequenceRef.findPosition(column) - 1;
+      int spos = _aa.sequenceRef.findPosition(column);
       if (spos >= _aa.sequenceRef.getStart()
               && spos <= 1 + _aa.sequenceRef.getEnd())
       {
index b302060..58e6ab1 100644 (file)
@@ -70,7 +70,8 @@ public class ContactMapRenderer implements AnnotationRowRendererI
       ContactListI contacts = viewport.getContactList(_aa, column);
       if (contacts == null)
       {
-        return;
+        x++;
+        continue;
       }
       // Bean holding mapping from contact list to pixels
       final ContactGeometry cgeom = new ContactGeometry(contacts,