From: tcofoegbu Date: Thu, 17 Sep 2015 14:59:19 +0000 (+0100) Subject: JAL-1774 bugfix for misleading message after trying to delete solid column X-Git-Tag: Release_2_10_0~399 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9ccf8e858d98d9bc0cca84504fecb566ee5afdca;p=jalview.git JAL-1774 bugfix for misleading message after trying to delete solid column --- 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! *