else if (dataset == null && data != null)
{
dataset = data;
+ for (int i = 0; i < getHeight(); i++)
+ {
+ SequenceI currentSeq = getSequenceAt(i);
+ SequenceI dsq = currentSeq.getDatasetSequence();
+ if (dsq == null)
+ {
+ dsq = currentSeq.createDatasetSequence();
+ dataset.addSequence(dsq);
+ }
+ else
+ {
+ while (dsq.getDatasetSequence() != null)
+ {
+ dsq = dsq.getDatasetSequence();
+ }
+ if (dataset.findIndex(dsq) == -1)
+ {
+ dataset.addSequence(dsq);
+ }
+ }
+ }
}
dataset.addAlignmentRef();
}