JAL-1506 revised implementation to clear only selected columns after a delete operation
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 18 Sep 2015 14:06:02 +0000 (15:06 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 18 Sep 2015 14:06:02 +0000 (15:06 +0100)
src/jalview/gui/AlignFrame.java

index e40e936..8f9e49e 100644 (file)
@@ -2386,10 +2386,10 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       {
         return;
       }
-      viewport.getColumnSelection().removeElements(sg.getStartRes(),
-              sg.getEndRes() + 1);
     }
 
+    viewport.getColumnSelection().removeElements(sg.getStartRes(),
+            sg.getEndRes() + 1);
     SequenceI[] cut = sg.getSequences()
             .toArray(new SequenceI[sg.getSize()]);
 
@@ -2401,7 +2401,6 @@ 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());