From c6b983048da1ba01c4edf75349de2d410b45356d Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 20 Oct 2022 17:14:24 +0100 Subject: [PATCH] JAL-2349 JAL-3855 off by one and daft return --- src/jalview/datamodel/Alignment.java | 2 +- src/jalview/renderer/ContactMapRenderer.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index fe65829..7f97f33 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -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()) { diff --git a/src/jalview/renderer/ContactMapRenderer.java b/src/jalview/renderer/ContactMapRenderer.java index b302060..58e6ab1 100644 --- a/src/jalview/renderer/ContactMapRenderer.java +++ b/src/jalview/renderer/ContactMapRenderer.java @@ -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, -- 1.7.10.2