}
// recover view properties and display parameters
- if (view.getViewName() != null)
- {
- af.viewport.viewName = view.getViewName();
- af.setInitialTabVisible();
- }
- af.setBounds(view.getXpos(), view.getYpos(), view.getWidth(),
- view.getHeight());
af.viewport.setShowAnnotation(view.getShowAnnotation());
af.viewport.setAbovePIDThreshold(view.getPidSelected());
af.viewport.setShowUnconserved(view.hasShowUnconserved() ? view
.isShowUnconserved() : false);
af.viewport.getRanges().setStartRes(view.getStartRes());
+
+ if (view.getViewName() != null)
+ {
+ af.viewport.viewName = view.getViewName();
+ af.setInitialTabVisible();
+ }
+ af.setBounds(view.getXpos(), view.getYpos(), view.getWidth(),
+ view.getHeight());
// startSeq set in af.alignPanel.updateLayout below
af.alignPanel.updateLayout();
ColourSchemeI cs = null;
import static org.testng.Assert.assertSame;
import static org.testng.Assert.assertTrue;
+import jalview.api.AlignCalcManagerI;
import jalview.bin.Cache;
import jalview.bin.Jalview;
import jalview.datamodel.Alignment;
new String[] { "Background" }));
/*
- * make a new View, verify alignment and group colour schemes
+ * make a new View, wait for Conservation thread to complete,
+ * verify alignment and group colour schemes
*/
af.newView_actionPerformed(null);
assertEquals(af.alignPanel.getViewName(), "View 1");
AlignViewport av2 = af.getViewport();
assertNotSame(av, av2);
+ assertSame(av2, af.alignPanel.av);
+ AlignCalcManagerI calcManager = av2.getCalcManager();
+ do
+ {
+ try
+ {
+ Thread.sleep(50);
+ } catch (InterruptedException x)
+ {
+ }
+ } while (calcManager.isWorking());
rs = av2.getResidueShading();
assertNotSame(av.getResidueShading(), rs);
assertEquals(rs.getThreshold(), 10);
- assertTrue(rs.conservationApplied());
+ assertTrue(rs.conservationApplied(), rs.toString());
assertEquals(rs.getConservationInc(), 20);
assertEquals(av2.getAlignment().getGroups().size(), 1);
sg = av2.getAlignment().getGroups().get(0);