X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FRedundancyPanel.java;h=0e55cf89f733d8dc081b57a6ad261a9a3e97208a;hb=d3a2fdc864b586b5c604335dd715ec215b679197;hp=91f24505a348dc32346c9d37d08ce86cb2feb436;hpb=aced09c4feeaf3406269442c14e54abeeb4cad81;p=jalview.git diff --git a/src/jalview/gui/RedundancyPanel.java b/src/jalview/gui/RedundancyPanel.java index 91f2450..0e55cf8 100755 --- a/src/jalview/gui/RedundancyPanel.java +++ b/src/jalview/gui/RedundancyPanel.java @@ -159,7 +159,7 @@ public class RedundancyPanel extends GSliderPanel implements Runnable 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); @@ -245,8 +245,7 @@ public class RedundancyPanel extends GSliderPanel implements Runnable 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()); } } @@ -259,12 +258,17 @@ public class RedundancyPanel extends GSliderPanel implements Runnable */ 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(); }