Sequence colour in viewport
[jalview.git] / src / jalview / gui / RedundancyPanel.java
index 2e136e0..ec896d5 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
@@ -262,7 +261,8 @@ public class RedundancyPanel extends GSliderPanel implements Runnable
             ap.av.alignment.deleteSequence( deleted[i] );\r
             PaintRefresher.Refresh(this,\r
                                    ap.av.getSequenceSetId(),\r
-                                   deleted[i], null);\r
+                                   true,\r
+                                   true);\r
             if (sg != null)\r
             {\r
               sg.deleteSequence(deleted[i], false);\r
@@ -271,6 +271,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 +290,12 @@ public class RedundancyPanel extends GSliderPanel implements Runnable
       CommandI command = (CommandI) historyList.pop();\r
       command.undoCommand();\r
 \r
+      if (ap.av.historyList.contains(command))\r
+      {\r
+        ap.av.historyList.remove(command);\r
+        af.updateEditMenuBar();\r
+      }\r
+\r
       ap.repaint();\r
 \r
       if (historyList.size() == 0)\r