progress.setVisible(false);
progress = null;
- label.setText("Enter the redundancy threshold");
+ label.setText(MessageManager.getString("label.enter_redundancy_thereshold"));
slider.setVisible(true);
applyButton.setEnabled(true);
valueField.setVisible(true);
ap.alignFrame.addHistoryItem(cut);
PaintRefresher.Refresh(this, ap.av.getSequenceSetId(), true, true);
- // ap.av.firePropertyChange("alignment", null, ap.av.getAlignment()
- // .getSequences());
+ ap.av.firePropertyChange("alignment", null, ap.av.getAlignment().getSequences());
}
}
*/
public void undoButton_actionPerformed(ActionEvent e)
{
+ if(historyList == null || historyList.isEmpty()){
+ undoButton.setEnabled(false);
+ return;
+ }
+
CommandI command = (CommandI) historyList.pop();
- command.undoCommand(af.getViewAlignments());
-
if (ap.av.historyList.contains(command))
{
+ command.undoCommand(af.getViewAlignments());
ap.av.historyList.remove(command);
+ ap.av.firePropertyChange("alignment", null, ap.av.getAlignment().getSequences());
af.updateEditMenuBar();
}