From: amwaterhouse Date: Wed, 14 Sep 2005 15:44:27 +0000 (+0000) Subject: Move bootStrap/distance settings outside thread X-Git-Tag: Release_2_05b~14 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=dfed2deda8ff4dc12557f4f728acabf76e76496d;p=jalview.git Move bootStrap/distance settings outside thread --- diff --git a/src/jalview/gui/TreePanel.java b/src/jalview/gui/TreePanel.java index f086162..c3bdd86 100755 --- a/src/jalview/gui/TreePanel.java +++ b/src/jalview/gui/TreePanel.java @@ -143,6 +143,16 @@ public class TreePanel extends GTreePanel public TreeLoader(NewickFile newtree) { this.newtree = newtree; + if (newtree != null) + { + // Must be outside run(), as Jalview2XML tries to + // update distance/bootstrap visibility at the same time + treeCanvas.setShowBootstrap(newtree.HasBootstrap()); + bootstrapMenu.setSelected(newtree.HasBootstrap()); + + treeCanvas.setShowDistances(newtree.HasDistances()); + distanceMenu.setSelected(newtree.HasDistances()); + } } public void run() @@ -155,13 +165,6 @@ public class TreePanel extends GTreePanel tree.reCount(tree.getTopNode()); tree.findHeight(tree.getTopNode()); treeCanvas.setTree(tree); - if(newtree!=null) - { - treeCanvas.setShowBootstrap(newtree.HasBootstrap()); - treeCanvas.setShowDistances(newtree.HasDistances()); - } - - setViewStateFromTreeCanvas(treeCanvas); treeCanvas.repaint(); @@ -179,31 +182,6 @@ public class TreePanel extends GTreePanel return tree; } - /** - * DOCUMENT ME! - * - * @param tree DOCUMENT ME! - */ - private void setViewStateFromTreeCanvas(TreeCanvas tree) - { - // update view menu state from treeCanvas render state - distanceMenu.setSelected(tree.showDistances); - bootstrapMenu.setSelected(tree.showBootstrap); - placeholdersMenu.setSelected(tree.markPlaceholders); - } - - /** - * DOCUMENT ME! - * - * @param tree DOCUMENT ME! - */ - private void setTreeCanvasFromViewState(TreeCanvas tree) - { - // update view menu state from treeCanvas render state - tree.showDistances = distanceMenu.isSelected(); - tree.showBootstrap = bootstrapMenu.isSelected(); - tree.markPlaceholders = placeholdersMenu.isSelected(); - } /** * DOCUMENT ME!