}\r
\r
String choice = chooser.getSelectedFile().getPath();\r
- Jalview2XML.SaveState(this, choice, shortName);\r
+ Jalview2XML.SaveAlignment(this, choice, shortName);\r
\r
// USE Jalview2XML to save this file\r
return;\r
\r
void NewTreePanel(String type, String pwType, String title)\r
{\r
- String ltitle;\r
final TreePanel tp;\r
\r
if ( (viewport.getSelectionGroup() != null) &&\r
{\r
jalview.io.NewickFile fin = new jalview.io.NewickFile(choice,\r
"File");\r
- ShowNewickTree(fin, choice);\r
+ viewport.setCurrentTree( ShowNewickTree(fin, choice).getTree() );\r
}\r
catch (Exception ex)\r
{\r
}\r
}\r
\r
- public void ShowNewickTree(NewickFile nf, String title)\r
+ public TreePanel ShowNewickTree(NewickFile nf, String title)\r
{\r
+ TreePanel tp = null;\r
try\r
{\r
nf.parse();\r
-\r
if (nf.getTree() != null)\r
{\r
- TreePanel tp = new TreePanel(viewport,\r
+ tp = new TreePanel(viewport,\r
viewport.getAlignment().getSequences(), nf,\r
"FromFile",\r
title);\r
Desktop.addInternalFrame(tp, title, 600, 500);\r
addTreeMenuItem(tp, title);\r
- viewport.setCurrentTree(tp.getTree());\r
}\r
}\r
catch (Exception ex)\r
{\r
ex.printStackTrace();\r
}\r
+ return tp;\r
}\r
\r
class PrintThread\r