{
if (getConservationSelected())
{
+ int retry = 0;
+ synchronized (this)
+ {
+ while (isCalcInProgress() && retry < 10)
+ {
+ try
+ {
+ wait(50);
+ retry++;
+ } catch (InterruptedException e)
+ {
+ }
+ }
+ }
residueShading.setConservation(hconservation);
}
residueShading.alignmentChanged(alignment, hiddenRepSequences);
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, wait for Conservation thread to complete,
- * verify alignment and group colour schemes
+ * make a new View, 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);