EditCommand added to AlignFrame
authoramwaterhouse <Andrew Waterhouse>
Wed, 25 Oct 2006 14:02:07 +0000 (14:02 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 25 Oct 2006 14:02:07 +0000 (14:02 +0000)
src/jalview/gui/RedundancyPanel.java

index 2e136e0..3df55c1 100755 (executable)
@@ -239,7 +239,6 @@ public class RedundancyPanel extends GSliderPanel implements Runnable
           }\r
         }\r
 \r
-\r
         // This has to be done before the restoreHistoryItem method of alignFrame will\r
         // actually restore these sequences.\r
         if (del.size() > 0)\r
@@ -271,6 +270,8 @@ public class RedundancyPanel extends GSliderPanel implements Runnable
 \r
           historyList.push(cut);\r
 \r
+          ap.alignFrame.addHistoryItem(cut);\r
+\r
           ap.av.firePropertyChange("alignment", null, ap.av.getAlignment().getSequences());\r
         }\r
 \r
@@ -288,6 +289,12 @@ public class RedundancyPanel extends GSliderPanel implements Runnable
       CommandI command = (CommandI) historyList.pop();\r
       command.undoCommand();\r
 \r
+      if (af.historyList.contains(command))\r
+      {\r
+        af.historyList.remove(command);\r
+        af.updateEditMenuBar();\r
+      }\r
+\r
       ap.repaint();\r
 \r
       if (historyList.size() == 0)\r