From 9ccf8e858d98d9bc0cca84504fecb566ee5afdca Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Thu, 17 Sep 2015 15:59:19 +0100 Subject: [PATCH] JAL-1774 bugfix for misleading message after trying to delete solid column --- src/jalview/gui/AlignFrame.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 360cf6b..e40e936 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -2370,7 +2370,11 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, /* * If the cut affects all sequences, warn, remove highlighted columns */ - if (sg.getSize() == viewport.getAlignment().getHeight()) + + boolean isEntireAlignWidth = (((sg.getEndRes() - sg.getStartRes()) + 1) == viewport + .getAlignment().getWidth()) ? true : false; + if (sg.getSize() == viewport.getAlignment().getHeight() + && isEntireAlignWidth) { int confirm = JOptionPane.showConfirmDialog(this, MessageManager.getString("warn.delete_all"), // $NON-NLS-1$ @@ -2397,6 +2401,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, viewport.setSelectionGroup(null); viewport.sendSelection(); viewport.getAlignment().deleteGroup(sg); + viewport.getColumnSelection().clear(); viewport.firePropertyChange("alignment", null, viewport.getAlignment() .getSequences()); @@ -2411,6 +2416,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } } + /** * DOCUMENT ME! * -- 1.7.10.2