JAL-2541 only need to shift features for ‘internal’ cut
authorJim Procter <jprocter@issues.jalview.org>
Tue, 24 Oct 2017 14:10:09 +0000 (15:10 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 24 Oct 2017 14:10:09 +0000 (15:10 +0100)
src/jalview/commands/EditCommand.java

index 4c2f8e7..a3ad0c2 100644 (file)
@@ -558,6 +558,11 @@ public class EditCommand implements CommandI
           }
           command.oldds[i] = oldds;
 
+          // do we need to edit sequence features for new sequence ?
+          if (oldds != sequence.getDatasetSequence()
+                  || (cutIsInternal
+                          && sequence.getFeatures().hasFeatures()))
+          {
             if (cutPositions != null)
             {
               cutFeatures(command, sequence, cutPositions.getBegin(),