"PCA and the tabbed alignment view should be the only two windows on the desktop");
PCAPanel pcaPanel = (PCAPanel) frames[frames[0] == af ? 1 : 0];
- AlignmentViewPanel restoredNewView = af.getAlignPanels().get(1);
+ AlignmentViewPanel restoredNewView = null;
+ for (AlignmentViewPanel alignpanel : Desktop.getAlignmentPanels(null))
+ {
+ if (alignpanel.getAlignViewport() == pcaPanel.getAlignViewport())
+ {
+ restoredNewView = alignpanel;
+ }
+ }
assertEquals(restoredNewView.getViewName(), PCAVIEWNAME);
assertTrue(
restoredNewView.getAlignViewport() == pcaPanel