{
AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
tfile.getAbsolutePath(), FormatAdapter.FILE);
+ afid = af.getViewport().getSequenceSetId();
}
- for (AlignmentViewPanel ap : Desktop.getAlignmentPanels(Desktop
- .getAlignFrames()[0].getViewport().getSequenceSetId()))
+ for (AlignmentViewPanel ap : Desktop.getAlignmentPanels(afid))
{
// check representative
SequenceI rep = ap.getAlignment().getSeqrep();
Assert.assertNotNull(rep,
"Couldn't restore sequence representative from project");
- Assert.assertEquals(refs.get(ap.getViewName()), rep,
+ // can't use a strong equals here, because by definition, the sequence IDs
+ // will be different.
+ // could set vamsas session save/restore flag to preserve IDs across
+ // load/saves.
+ Assert.assertEquals(refs.get(ap.getViewName()).toString(),
+ rep.toString(),
"Representative wasn't the same when recovered.");
Assert.assertTrue(ap.getAlignViewport().isDisplayReferenceSeq(),
"Display reference sequence view setting not set.");