JAL-2335 patched FeatureRendererModel.findFeaturesAtRes to honour isContactFeature bug/JAL-2323disulfideOverview
authorJim Procter <jprocter@issues.jalview.org>
Mon, 21 Nov 2016 16:31:45 +0000 (16:31 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Mon, 21 Nov 2016 16:31:45 +0000 (16:31 +0000)
src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java

index 7ff9adf..c1ad465 100644 (file)
@@ -288,8 +288,12 @@ public abstract class FeatureRendererModel implements
           continue;
         }
 
-        if ((features[i].getBegin() <= res)
-                && (features[i].getEnd() >= res))
+        // check if start/end are at res, and if not a contact feature, that res
+        // lies between start and end
+        if ((features[i].getBegin() == res || features[i].getEnd() == res)
+                || (!features[i].isContactFeature()
+                        && (features[i].getBegin() < res) && (features[i]
+                        .getEnd() >= res)))
         {
           tmp.add(features[i]);
         }