package jalview.gui;
import java.util.*;
+import java.util.List;
import java.awt.*;
{
if (i < comp.getHeight())
{
- comp.getSequences().insertElementAt(a1[i], i);
+ // TODO: the following does not trigger any recalculation of height/etc, or maintain the dataset
+ if (comp.getDataset()!=source.getDataset())
+ {
+ // raise an implementation warning here - not sure if this situation will ever occur
+ System.err.println("IMPLEMENTATION PROBLEM: DATASET out of sync due to an insert whilst calling PaintRefresher.validateSequences(AlignmentI, ALignmentI)");
+ }
+ List<SequenceI> alsq;
+ synchronized (alsq=comp.getSequences()) {
+ alsq.add(i, a1[i]);
+ }
}
else
{