JAL-391 add reverse / complement to command history for Undo / Redo
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 26 May 2016 14:55:46 +0000 (15:55 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 26 May 2016 14:55:46 +0000 (15:55 +0100)
src/jalview/gui/AlignFrame.java

index 8ae74d4..d9d5f27 100644 (file)
@@ -6062,9 +6062,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     try
     {
       Dna dna = new Dna(viewport, viewport.getViewAsVisibleContigs(true));
-
       al = dna.reverseCdna(complement);
       viewport.addAlignment(al, "");
+      addHistoryItem(new EditCommand(
+              MessageManager.getString("label.add_sequences"),
+              Action.PASTE, al.getSequencesArray(), 0, al.getWidth(),
+              viewport.getAlignment()));
     } catch (Exception ex)
     {
       System.err.println(ex.getMessage());