From 477123268cc1e7b6d2f8534e9cf3cc6b1274cd90 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 10 Feb 2005 13:20:58 +0000 Subject: [PATCH] isAligned method added, check before making tree --- src/jalview/gui/AlignFrame.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 3211b03..f3d0d99 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -771,6 +771,14 @@ public class AlignFrame extends GAlignFrame void NewTreePanel(String type, String pwType, String title) { + //are the sequences aligned? + if(!viewport.alignment.isAligned()) + { + JOptionPane.showMessageDialog(Desktop.desktop, "The sequences must be aligned before creating a tree.", + "Sequences not aligned", JOptionPane.WARNING_MESSAGE); + return; + } + JInternalFrame frame = new javax.swing.JInternalFrame(); TreePanel tp=null; if (viewport.getSelection() != null && viewport.getSelection().size() > 3) -- 1.7.10.2