\r
public void pairwiseAlignmentMenuItem_actionPerformed()\r
{\r
- if (viewport.getSelectionGroup().getSize(false) > 1)\r
+ if (viewport.getSelectionGroup()!=null\r
+ && viewport.getSelectionGroup().getSize(false) > 1)\r
{\r
Frame frame = new Frame();\r
frame.add(new PairwiseAlignPanel(alignPanel));\r
\r
}\r
\r
- final TreePanel tp = new TreePanel(viewport,\r
- type,\r
- pwType);\r
+ if ( (viewport.getSelectionGroup() != null &&\r
+ viewport.getSelectionGroup().getSize(false) > 1)\r
+ || (viewport.getSelectionGroup() == null\r
+ && viewport.alignment.getHeight() > 1))\r
+ {\r
+ final TreePanel tp = new TreePanel(viewport,\r
+ type,\r
+ pwType);\r
\r
- addTreeMenuItem(tp, title);\r
+ addTreeMenuItem(tp, title);\r
\r
- jalview.bin.JalviewLite.addFrame(tp, title, 600, 500);\r
+ jalview.bin.JalviewLite.addFrame(tp, title, 600, 500);\r
+ }\r
}\r
\r
void loadTree_actionPerformed()\r