isAligned method added, check before making tree
authoramwaterhouse <Andrew Waterhouse>
Thu, 10 Feb 2005 13:20:58 +0000 (13:20 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 10 Feb 2005 13:20:58 +0000 (13:20 +0000)
src/jalview/gui/AlignFrame.java

index 3211b03..f3d0d99 100755 (executable)
@@ -771,6 +771,14 @@ public class AlignFrame extends GAlignFrame
 \r
   void NewTreePanel(String type, String pwType, String title)\r
   {\r
+    //are the sequences aligned?\r
+    if(!viewport.alignment.isAligned())\r
+    {\r
+      JOptionPane.showMessageDialog(Desktop.desktop, "The sequences must be aligned before creating a tree.",\r
+                                    "Sequences not aligned", JOptionPane.WARNING_MESSAGE);\r
+      return;\r
+    }\r
+\r
     JInternalFrame frame = new javax.swing.JInternalFrame();\r
     TreePanel tp=null;\r
    if (viewport.getSelection() != null && viewport.getSelection().size() > 3)\r