fixed redundancy Undo and allowed it to work on UNALIGNED SEQUENCES
[jalview.git] / src / jalview / gui / AlignFrame.java
index 1183cd8..6447005 100755 (executable)
@@ -419,11 +419,12 @@ public class AlignFrame extends GAlignFrame
   protected void delete_actionPerformed(ActionEvent e)
   {
     boolean seqsdeleted=false;
-    addHistoryItem(new HistoryItem("Delete Sequences", viewport.alignment, HistoryItem.HIDE));
 
     if (viewport.getSelectionGroup() == null)
       return;
 
+    addHistoryItem(new HistoryItem("Delete Sequences", viewport.alignment, HistoryItem.HIDE));
+
      SequenceGroup sg = viewport.getSelectionGroup();
      for (int i=0;i < sg.sequences.size(); i++)
      {
@@ -996,7 +997,7 @@ public class AlignFrame extends GAlignFrame
 
   public void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
   {
-    RedundancyPanel sp = new RedundancyPanel(alignPanel);
+    RedundancyPanel sp = new RedundancyPanel(alignPanel, this);
     JInternalFrame frame = new JInternalFrame();
     frame.setContentPane(sp);
     Desktop.addInternalFrame(frame, "Redundancy threshold selection", 400, 100, false);