JAL-353 updated patch for undo successive remove redundant sequence
authorCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Thu, 30 Oct 2014 12:27:40 +0000 (12:27 +0000)
committerCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Thu, 30 Oct 2014 12:27:40 +0000 (12:27 +0000)
src/jalview/commands/EditCommand.java

index b39d1dd..5c698a8 100644 (file)
@@ -359,9 +359,10 @@ public class EditCommand implements CommandI
           List<SequenceI> sequences;
           synchronized (sequences = command.al.getSequences())
           {
-            // int index = command.al.findIndex(command.seqs[i]);
-            // sequences.add(index, command.seqs[i]);
-            sequences.add(command.alIndex[i] < 0 ? 0 : command.alIndex[i], command.seqs[i]);
+            if (!(command.alIndex[i] < 0))
+            {
+              sequences.add(command.alIndex[i], command.seqs[i]);
+            }
           }
         }
         else