JAL-1115 refactor base collection for Alignment from Vector to locally synchronized...
[jalview.git] / src / jalview / commands / EditCommand.java
index 76ddbac..a8aa886 100644 (file)
@@ -344,8 +344,10 @@ public class EditCommand implements CommandI
         // read it to the alignment
         if (command.alIndex[i] < command.al.getHeight())
         {
-          command.al.getSequences().insertElementAt(command.seqs[i],
-                  command.alIndex[i]);
+          List<SequenceI> sequences;
+          synchronized (sequences=command.al.getSequences()) {
+            sequences.add(command.alIndex[i], command.seqs[i]);
+          }
         }
         else
         {