{\r
float threshold = slider.getValue();\r
Vector del;\r
- historyList.push(new HistoryItem("Remove redundancy (" + threshold + "%)",\r
+ HistoryItem it;\r
+ historyList.push(it=new HistoryItem("Remove redundancy",\r
ap.av.alignment, HistoryItem.HIDE));\r
-\r
+ if (historyList.size()==1\r
+ || !af.historyList.contains(historyList.firstElement())) {\r
+ af.addHistoryItem((HistoryItem) historyList.firstElement());\r
+ af.updateEditMenuBar();\r
+ }\r
undoButton.setEnabled(true);\r
SequenceGroup sg = ap.av.getSelectionGroup();\r
if (sg != null && sg.getSize() >= 1)\r
\r
public void undoButton_actionPerformed(ActionEvent e)\r
{\r
- HistoryItem hi = (HistoryItem)historyList.pop();\r
+ HistoryItem hi = (HistoryItem) historyList.pop();\r
af.restoreHistoryItem(hi);\r
- if (historyList.size()==0)\r
+ if (historyList.size() == 0)\r
+ {\r
undoButton.setEnabled(false);\r
+ if (af.historyList.contains(hi))\r
+ {\r
+ af.historyList.remove(hi);\r
+ af.updateEditMenuBar();\r
+ }\r
+ }\r
}\r
-\r
public void valueField_actionPerformed(ActionEvent e)\r
{\r
try\r