JAL-2541 adjust end of contact feature spanning cut region
[jalview.git] / src / jalview / commands / EditCommand.java
index 7387295..84335c7 100644 (file)
@@ -1412,6 +1412,19 @@ public class EditCommand implements CommandI
               cutStartPos, cutEndPos);
   
       /*
+       * add any contact features that span the cut region
+       * (not returned by findFeatures)
+       */
+      for (SequenceFeature contact : featureStore.getContactFeatures())
+      {
+        if (contact.getBegin() < cutStartPos
+                && contact.getEnd() > cutEndPos)
+        {
+          toAmend.add(contact);
+        }
+      }
+
+      /*
        * adjust start-end of overlapping features;
        * delete features enclosed by the cut;
        * delete partially overlapping contact features