fix for bug #8333
authorjprocter <Jim Procter>
Fri, 23 Apr 2010 12:20:42 +0000 (12:20 +0000)
committerjprocter <Jim Procter>
Fri, 23 Apr 2010 12:20:42 +0000 (12:20 +0000)
src/jalview/appletgui/TreePanel.java

index 735a11b..f3cde9d 100755 (executable)
@@ -215,10 +215,14 @@ public class TreePanel extends EmbmenuFrame implements ActionListener,
       treeCanvas.setTree(tree);
       if (newtree != null)
       {
-        distanceMenu.setState(newtree.HasDistances());
-        bootstrapMenu.setState(newtree.HasBootstrap());
-        treeCanvas.setShowBootstrap(newtree.HasBootstrap());
-        treeCanvas.setShowDistances(newtree.HasDistances());
+        // Set default view, paying lip service to any overriding tree view parameter settings
+        boolean showDist = newtree.HasDistances() && av.applet.getDefaultParameter("showTreeDistances", newtree.HasDistances());
+        boolean showBoots = newtree.HasBootstrap() && av.applet.getDefaultParameter("showTreeBootstraps", newtree.HasBootstrap());
+        distanceMenu.setState(showDist);
+        bootstrapMenu.setState(showBoots);
+        treeCanvas.setShowBootstrap(showBoots);
+        treeCanvas.setShowDistances(showDist);
+        treeCanvas.setMarkPlaceholders(av.applet.getDefaultParameter("showUnlinkedTreeNodes", false));
       }
 
       treeCanvas.repaint();